source: GTP/trunk/App/Demos/Geom/Shark3D/clod_head_demo_win32/src/res/level/actor/main.s3d_actor @ 2236

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