source: GTP/trunk/App/Demos/Illum/IBRBillboardCloudTrees/Shark3D/src/res/level_shmap/actor/main.s3d_actor @ 2517

Revision 2517, 10.9 KB checked in by igarcia, 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        // Delegate action calls to the children.
41        active 1
42        child_array
43        {
44            // Dispatcher for commands from outside the level.
45            // Commands coming from outside the capsule are delegated
46            // to this dispatcher. This dispatcher then decides
47            // which commands are understood, and which are the target actors.
48            ident "kit_base.dispatch"
49            param
50            {
51                // Name of the actor.
52                name "dispatch_export"
53                entry_array
54                {
55                    // Utility, to get a simple access to the level admin.
56                    cmds "get_level"
57                    targets "capsule"
58                    newcmd "get_admin"
59                }
60                {
61                    cmds "produce_player"
62                    targets "playerproducer"
63                    newcmd "produce"
64                }
65                {
66                    cmds "fetch_player"
67                    targets "player_set"
68                    newcmd "search_noinform"
69                }
70                {
71                    cmds "net_traverse"
72                    targets "dispatch_content"
73                }
74            }
75        }
76        {
77            ident "kit_base.deleg"
78            param
79            {
80                name ""
81                deleg_name "env"
82                deleg_target "^env"
83                allow_no_target 0
84                enabled 1
85            }
86        }
87        {
88            ident "kit_base.deleg"
89            param
90            {
91                name ""
92                deleg_name "perchmgr"
93                deleg_target "^perchmgr"
94                allow_no_target 0
95                enabled 1
96            }
97        }
98        {
99            ident "kit_engbase.gfxmgr"
100            param
101            {
102                name "gfxmgr"
103                ident "eng_base.gfxmgr"
104            }
105        }
106        {
107            ident "kit_base.obj"
108            param
109            {
110                name "gfxsuppl"
111                obj_suppl "^envcompsuppl"
112                obj_ident "eng_base.gfxsuppl"
113                obj_param
114                {
115                    env "env"
116                    child_suppl "^basesuppl"
117                }
118            }
119        }
120        {
121            ident "kit_engbase.gfxassign"
122            param
123            {
124                obj "gfxsuppl"
125                gfxmgr "gfxmgr"
126            }
127        }
128        {
129            ident "kit_engbase.sndmgr"
130            param
131            {
132                name "sndmgr"
133                ident "eng_base.sndmgr"
134            }
135        }
136        {
137            ident "kit_base.obj"
138            param
139            {
140                name "stdsuppl"
141                obj_suppl "^envcompsuppl"
142                obj_ident "eng_base.sndsuppl"
143                obj_param
144                {
145                    env "env"
146                    child_suppl "gfxsuppl"
147                }
148            }
149        }
150        {
151            ident "kit_engbase.sndassign"
152            param
153            {
154                obj "stdsuppl"
155                sndmgr "sndmgr"
156            }
157        }
158        {
159            ident "kit_engbase.clock"
160            param
161            {
162                active 1
163                name "clock"
164                clock_suppl "stdsuppl"
165                clock_ident "clock:"
166            }
167        }
168        {
169            ident "kit_engbase.state"
170            param
171            {
172                name "state_world"
173                obj_suppl "stdsuppl"
174                obj_ident "state:"
175            }
176        }
177        {
178            ident "kit_engbase.state"
179            param
180            {
181                name "state_sky"
182                obj_suppl "stdsuppl"
183                obj_ident "state:"
184            }
185        }
186        {
187            ident "kit_base.obj"
188            param
189            {
190                name "sensorstate_world"
191                obj_suppl "stdsuppl"
192                obj_ident "stdsensorstate:"
193                obj_param
194                {
195                    env "env"
196                    insp_geo_ident "showsensorgeo"
197                    insp_bound_ident "showsensorbound"
198                    insp_geo_color 0.0 0.0 1.0
199                    insp_bound_color 0.0 0.0 1.0
200                }
201            }
202        }
203        {
204            ident "kit_engobj.sim"
205            param
206            {
207                name "sim_world"
208                sim_suppl "stdsuppl"
209                sim_ident "sim:"
210                sim_param
211                {
212                    env "env"
213                    // When changing the step, you should change the erp
214                    // by the same factor:
215                    step 0.02
216                    subiter 0
217                    gravity 0.0 0.0 -10.0
218                    erp 0.5
219                    cfm 1e-4
220                    max_correcting_vel 1000.0
221                    overlap 0.001
222                    damp 0.05
223                    max_vel 10.0
224                    max_spin 10.0
225                    settled_pos_eps 0.01
226                    settled_rot_eps 0.01
227                    settled_period 1.0
228                    settled_dist 1e3
229                    insp_geo_ident "showphysgeo"
230                    insp_bound_ident "showphysbound"
231                    insp_contact_ident "showphyscontact"
232                    insp_pas_geo_color 0.0 0.0 1.0
233                    insp_pas_bound_color 0.0 0.0 1.0
234                    insp_deact_geo_color 0.0 1.0 0.0
235                    insp_deact_bound_color 0.0 1.0 0.0
236                    insp_act_geo_color 1.0 0.0 0.0
237                    insp_act_bound_color 1.0 0.0 0.0
238                    insp_slave_geo_color 1.0 0.0 1.0
239                    insp_slave_bound_color 1.0 0.0 1.0
240                    insp_contact_extralen 0.2
241                    insp_contact_pre_color 1.0 0.0 1.0
242                    insp_contact_mid_color 0.0 0.0 1.0
243                    insp_contact_post_color 0.0 1.0 1.0
244                }
245                clock "clock"
246            }
247        }
248        {
249            // Event queue.
250            // This actor manages delayed commands.
251            // Define this actor after the 3d state
252            // to avoid unnecessary delays.
253            ident "kit_base.evtmgr"
254            param
255            {
256                // Name of the event queue actor:
257                name "evtmgr"
258                active 1
259                extcfg_actor "^cfg"
260                extcfg_entry_log "log.evtmgr"
261            }
262        }
263        {
264            ident "kit_base.extern"
265            param
266            {
267                // Delegate action calls to the child:
268                name "content_extern"
269                res "level_shmap/actor/content.s3d_actor_run"
270                watch_target "content_extern"
271                watch_cmd "load_current"
272                active 1
273            }
274        }
275        {
276            // Actor containing all active players.
277            ident "kit_base.producer"
278            param
279            {
280                name "playerproducer"
281                deleg_name "player_set"
282                active 1
283                ident "kit_base.capsule"
284                param
285                {
286                    scope "levelplayer"
287                    local_name "capsule"
288                    local_deleg_name "capsule_deleg"
289                    deleg_target "dispatch_rawexport"
290                    active 1
291                    child_ident "kit_base.group"
292                    child_param
293                    {
294                        // Delegate action calls to the children.
295                        active 1
296                        child_array
297                        {
298                            ident "kit_base.dispatch"
299                            param
300                            {
301                                name "dispatch_rawexport"
302                                allow_other 1
303                                other_target "dispatch_export"
304                                entry_array
305                            }
306                        }
307                        {
308                            // Include the character actors for this level.
309                            // It is defined after the character bag
310                            // since this dsc file refers the bag actor.
311                            ident "kit_base.extern"
312                            param
313                            {
314                                // Delegate action calls to the child:
315                                name "levelplayerbasis_extern"
316                                res "level_shmap/actor/"
317                                        & "levelplayerbasis.s3d_actor_run"
318                                watch_target "levelplayerbasis_extern"
319                                watch_cmd "load_current"
320                                active 1
321                            }
322                        }
323                    }
324                }
325            }
326        }
327        {
328            // Ignore level load time.
329            ident "kit_base.oninit"
330            param
331            {
332                target "^outside"
333                cmd "ignore_frmtime"
334            }
335        }
336    }
337}
Note: See TracBrowser for help on using the repository browser.