source: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/IllumDemo/bin/res/level/actor/main.s3d_actor_run @ 2196

Revision 2196, 11.1 KB checked in by szirmay, 17 years ago (diff)
Line 
1///////////////////////////////////////////////////////////////////////////////
2//
3//      ##  ######
4//       ######  ###
5//  ## ###############        Shark 3D Engine (www.shark3d.com)
6//   ########## # # #
7//    ########                Copyright (c) 1996-2006 Spinor GmbH.
8//   ######### # # #          All rights reserved.
9//  ##   ##########
10//      ##
11//
12///////////////////////////////////////////////////////////////////////////////
13
14// Define a local namespace for the level.
15// All actors within the capsule can access each other without restrictions.
16// All foreign actors outside the capsule cannot access actors
17// within the capsule. Instead, foreign can only send commands
18// to the capsule itself. The capsule delegates the commands
19// in a controlled way, see below.
20actor_ident "kit_base.capsule"
21actor_param
22{
23    // Delegate the action calls to all children:
24    active 1
25    // Scope string used for reporting errors:
26    scope "level"
27    // Name of the capsule actor within its own namespace.
28    // Actors within the capsule can access the capsule actor itself
29    // by this name.
30    local_name "capsule"
31    // Delegate commands from outside the capsule to this dispatcher.
32    // The dispatcher handles the commands from outside in a controlled way.
33    deleg_target "dispatch_export"
34    // Define a group of actors contained in the capsule actor.
35    // Formally, a capsule can only have a single member,
36    // but by using a group actor, it can contain any number of members.
37    child_ident "kit_base.group"
38    child_param
39    {
40        active 1
41        child_array
42        {
43            // Dispatcher for commands from outside the level.
44            // Commands coming from outside the capsule are delegated
45            // to this dispatcher. This dispatcher then decides
46            // which commands are understood, and which are the target actors.
47            ident "kit_base.dispatch"
48            param
49            {
50                // Name of the actor.
51                name "dispatch_export"
52                entry_array
53                {
54                    // Utility, to get a simple access to the level admin.
55                    cmds "get_level"
56                    targets "capsule"
57                    newcmd "get_admin"
58                }
59                {
60                    cmds "produce_player"
61                    targets "playerproducer"
62                    newcmd "produce"
63                }
64                {
65                    cmds "fetch_player"
66                    targets "player_set"
67                    newcmd "search_noinform"
68                }
69                {
70                    cmds "net_traverse"
71                    targets "player_appear"
72                    newcmd "traverse"
73                }
74                {
75                    cmds "net_traverse"
76                    targets "dispatch_content"
77                }
78            }
79        }
80        {
81            ident "kit_base.deleg"
82            param
83            {
84                name ""
85                deleg_name "env"
86                deleg_target "^env"
87                allow_no_target 0
88                enabled 1
89            }
90        }
91        {
92            ident "kit_base.deleg"
93            param
94            {
95                name ""
96                deleg_name "perchmgr"
97                deleg_target "^perchmgr"
98                allow_no_target 0
99                enabled 1
100            }
101        }
102        {
103            ident "kit_engbase.gfxmgr"
104            param
105            {
106                name "gfxmgr"
107                ident "eng_base.gfxmgr"
108            }
109        }
110        {
111            ident "kit_base.obj"
112            param
113            {
114                name "gfxsuppl"
115                obj_suppl "^envcompsuppl"
116                obj_ident "eng_base.gfxsuppl"
117                obj_param
118                {
119                    env "env"
120                    child_suppl "^basesuppl"
121                }
122            }
123        }
124        {
125            ident "kit_engbase.gfxassign"
126            param
127            {
128                obj "gfxsuppl"
129                gfxmgr "gfxmgr"
130            }
131        }
132        {
133            ident "kit_engbase.sndmgr"
134            param
135            {
136                name "sndmgr"
137                ident "eng_base.sndmgr"
138            }
139        }
140        {
141            ident "kit_base.obj"
142            param
143            {
144                name "stdsuppl"
145                obj_suppl "^envcompsuppl"
146                obj_ident "eng_base.sndsuppl"
147                obj_param
148                {
149                    env "env"
150                    child_suppl "gfxsuppl"
151                }
152            }
153        }
154        {
155            ident "kit_engbase.sndassign"
156            param
157            {
158                obj "stdsuppl"
159                sndmgr "sndmgr"
160            }
161        }
162        {
163            ident "kit_engbase.clock"
164            param
165            {
166                active 1
167                name "clock"
168                clock_suppl "stdsuppl"
169                clock_ident "clock:"
170            }
171        }
172        {
173            ident "kit_engbase.state"
174            param
175            {
176                name "state_world"
177                obj_suppl "stdsuppl"
178                obj_ident "state:"
179            }
180        }
181        {
182            ident "kit_engbase.state"
183            param
184            {
185                name "state_sky"
186                obj_suppl "stdsuppl"
187                obj_ident "state:"
188            }
189        }
190        {
191            ident "kit_base.obj"
192            param
193            {
194                name "sensorstate_world"
195                obj_suppl "stdsuppl"
196                obj_ident "stdsensorstate:"
197                obj_param
198                {
199                    env "env"
200                    insp_geo_ident "insp_sensor_geo"
201                    insp_bound_ident "insp_sensor_bound"
202                    insp_geo_color 0.0 0.0 1.0
203                    insp_bound_color 0.0 0.0 1.0
204                }
205            }
206        }
207        {
208            ident "kit_engobj.sim"
209            param
210            {
211                name "sim_world"
212                sim_suppl "stdsuppl"
213                sim_ident "sim:"
214                sim_param
215                {
216                    env "env"
217                    // When changing the step, you should change the erp
218                    // by the same factor:
219                    step 0.02
220                    subiter 0
221                    gravity 0.0 0.0 -10.0
222                    erp 0.5
223                    cfm 1e-4
224                    max_correcting_vel 1000.0
225                    overlap 0.001
226                    damp 0.05
227                    max_vel 10.0
228                    max_spin 10.0
229                    settled_pos_eps 0.01
230                    settled_rot_eps 0.01
231                    settled_period 1.0
232                    settled_dist 1e3
233                    insp_geo_ident "insp_sim_geo"
234                    insp_bound_ident "insp_sim_bound"
235                    insp_contact_ident "insp_sim_contact"
236                    insp_pas_geo_color 0.0 0.0 1.0
237                    insp_pas_bound_color 0.0 0.0 1.0
238                    insp_deact_geo_color 0.0 1.0 0.0
239                    insp_deact_bound_color 0.0 1.0 0.0
240                    insp_act_geo_color 1.0 0.0 0.0
241                    insp_act_bound_color 1.0 0.0 0.0
242                    insp_slave_geo_color 1.0 0.0 1.0
243                    insp_slave_bound_color 1.0 0.0 1.0
244                    insp_contact_extralen 0.2
245                    insp_contact_pre_color 1.0 0.0 1.0
246                    insp_contact_mid_color 0.0 0.0 1.0
247                    insp_contact_post_color 0.0 1.0 1.0
248                }
249                clock "clock"
250            }
251        }
252        {
253            // Event queue.
254            // This actor manages delayed commands.
255            // Define this actor after the 3d state
256            // to avoid unnecessary delays.
257            ident "kit_base.evtmgr"
258            param
259            {
260                // Name of the event queue actor:
261                name "evtmgr"
262                active 1
263                extcfg_actor "^cfg"
264                extcfg_entry_log "log.evtmgr"
265            }
266        }
267        {
268            ident "kit_base.extern"
269            param
270            {
271                name "content_extern"
272                res "level/actor/content.s3d_actor_run"
273                watch_target "content_extern"
274                watch_cmd "load_current"
275                active 1
276            }
277        }
278        {
279            // Actor containing all active players.
280            ident "kit_base.producer"
281            param
282            {
283                name "playerproducer"
284                deleg_name "player_set"
285                active 1
286                ident "kit_base.capsule"
287                param
288                {
289                    scope "levelplayer"
290                    local_name "capsule"
291                    local_deleg_name "capsule_deleg"
292                    deleg_target "dispatch_rawexport"
293                    active 1
294                    child_ident "kit_base.group"
295                    child_param
296                    {
297                        active 1
298                        child_array
299                        {
300                            ident "kit_base.dispatch"
301                            param
302                            {
303                                name "dispatch_rawexport"
304                                allow_other 1
305                                other_target "dispatch_export"
306                                entry_array
307                            }
308                        }
309                        {
310                            // Include the character actors for this level.
311                            // It is defined after the character bag
312                            // since this dsc file refers the bag actor.
313                            ident "kit_base.extern"
314                            param
315                            {
316                                // Delegate action calls to the child:
317                                name "levelplayerbasis_extern"
318                                res "level/actor/"
319                                        & "levelplayerbasis.s3d_actor_run"
320                                watch_target "levelplayerbasis_extern"
321                                watch_cmd "load_current"
322                                active 1
323                            }
324                        }
325                    }
326                }
327            }
328        }
329        {
330            ident "kit_engbase.netappear"
331            param
332            {
333                name "player_appear"
334                appear_target "player_set"
335                appear_cmd "net_appear"
336            }
337        }
338        {
339            // Ignore level load time.
340            ident "kit_base.oninit"
341            param
342            {
343                target "^outside"
344                cmd "ignore_frmtime"
345            }
346        }
347    }
348}
Note: See TracBrowser for help on using the repository browser.