[2270] | 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 | // This file describes the server.
|
---|
| 15 |
|
---|
| 16 | // The server has an own namespace:
|
---|
| 17 | actor_ident "kit_base.capsule"
|
---|
| 18 | actor_param
|
---|
| 19 | {
|
---|
| 20 | active 1
|
---|
| 21 | scope "server"
|
---|
| 22 | local_name "capsule"
|
---|
| 23 | deleg_target "dispatch_export"
|
---|
| 24 | child_ident "kit_base.group"
|
---|
| 25 | child_param
|
---|
| 26 | {
|
---|
| 27 | active 1
|
---|
| 28 | child_array
|
---|
| 29 | {
|
---|
| 30 | // Dispatcher handling messages from outside the server.
|
---|
| 31 | ident "kit_base.dispatch"
|
---|
| 32 | param
|
---|
| 33 | {
|
---|
| 34 | name "dispatch_export"
|
---|
| 35 | entry_array
|
---|
| 36 | {
|
---|
| 37 | // Create local player (not via networking):
|
---|
| 38 | cmds "produce_player"
|
---|
| 39 | targets "universe"
|
---|
| 40 | }
|
---|
| 41 | }
|
---|
| 42 | }
|
---|
| 43 | {
|
---|
| 44 | ident "kit_base.dispatch"
|
---|
| 45 | param
|
---|
| 46 | {
|
---|
| 47 | name "dispatch"
|
---|
| 48 | entry_array
|
---|
| 49 | }
|
---|
| 50 | }
|
---|
| 51 | {
|
---|
| 52 | // Dispatcher handling messages from the universe.
|
---|
| 53 | ident "kit_base.dispatch"
|
---|
| 54 | param
|
---|
| 55 | {
|
---|
| 56 | name "dispatch_universe"
|
---|
| 57 | entry_array
|
---|
| 58 | {
|
---|
| 59 | cmds "get_basesuppl"
|
---|
| 60 | targets "sersuppl"
|
---|
| 61 | newcmd "get_obj"
|
---|
| 62 | }
|
---|
| 63 | {
|
---|
| 64 | cmds "ignore_frmtime"
|
---|
| 65 | targets "^root"
|
---|
| 66 | }
|
---|
| 67 | {
|
---|
| 68 | cmds "cfg_access_int_info"
|
---|
| 69 | targets "^cfg"
|
---|
| 70 | newcmd "access_int_info"
|
---|
| 71 | }
|
---|
| 72 | {
|
---|
| 73 | cmds "cfg_access_float_info"
|
---|
| 74 | targets "^cfg"
|
---|
| 75 | newcmd "access_float_info"
|
---|
| 76 | }
|
---|
| 77 | {
|
---|
| 78 | cmds "cfg_access_str_info"
|
---|
| 79 | targets "^cfg"
|
---|
| 80 | newcmd "access_str_info"
|
---|
| 81 | }
|
---|
| 82 | {
|
---|
| 83 | cmds "cfg_access_chunk_info"
|
---|
| 84 | targets "^cfg"
|
---|
| 85 | newcmd "access_chunk_info"
|
---|
| 86 | }
|
---|
| 87 | {
|
---|
| 88 | cmds "universe_cfg_access_int_info"
|
---|
| 89 | targets "universe_cfg"
|
---|
| 90 | newcmd "access_int_info"
|
---|
| 91 | }
|
---|
| 92 | {
|
---|
| 93 | cmds "universe_cfg_access_float_info"
|
---|
| 94 | targets "universe_cfg"
|
---|
| 95 | newcmd "access_float_info"
|
---|
| 96 | }
|
---|
| 97 | {
|
---|
| 98 | cmds "universe_cfg_access_str_info"
|
---|
| 99 | targets "universe_cfg"
|
---|
| 100 | newcmd "access_str_info"
|
---|
| 101 | }
|
---|
| 102 | {
|
---|
| 103 | cmds "universe_cfg_access_chunk_info"
|
---|
| 104 | targets "universe_cfg"
|
---|
| 105 | newcmd "access_chunk_info"
|
---|
| 106 | }
|
---|
| 107 | }
|
---|
| 108 | }
|
---|
| 109 | {
|
---|
| 110 | ident "kit_perch.mgr"
|
---|
| 111 | param
|
---|
| 112 | {
|
---|
| 113 | name "perchmgr"
|
---|
| 114 | }
|
---|
| 115 | }
|
---|
| 116 | {
|
---|
| 117 | ident "kit_snk.data"
|
---|
| 118 | param
|
---|
| 119 | {
|
---|
| 120 | name "universe_cfg"
|
---|
| 121 | val
|
---|
| 122 | {
|
---|
| 123 | server 1
|
---|
| 124 | }
|
---|
| 125 | }
|
---|
| 126 | }
|
---|
| 127 | {
|
---|
| 128 | ident "kit_base.sersuppl"
|
---|
| 129 | param
|
---|
| 130 | {
|
---|
| 131 | name "sersuppl"
|
---|
| 132 | child "^basesuppl"
|
---|
| 133 | }
|
---|
| 134 | }
|
---|
| 135 | {
|
---|
| 136 | ident "kit_base.onaction"
|
---|
| 137 | param
|
---|
| 138 | {
|
---|
| 139 | active 1
|
---|
| 140 | target "link_set"
|
---|
| 141 | cmd "poll_recv"
|
---|
| 142 | }
|
---|
| 143 | }
|
---|
| 144 | {
|
---|
| 145 | // Event queue
|
---|
| 146 | ident "kit_base.evtmgr"
|
---|
| 147 | param
|
---|
| 148 | {
|
---|
| 149 | active 1
|
---|
| 150 | name "evtmgr"
|
---|
| 151 | extcfg_actor "^cfg"
|
---|
| 152 | extcfg_entry_log "log.evtmgr"
|
---|
| 153 | }
|
---|
| 154 | }
|
---|
| 155 | {
|
---|
| 156 | // Include the universe definition:
|
---|
| 157 | ident "kit_engbase.extern"
|
---|
| 158 | param
|
---|
| 159 | {
|
---|
| 160 | active 1
|
---|
| 161 | name "universe_extern"
|
---|
| 162 | deleg_name "universe"
|
---|
| 163 | allow_no_target 1
|
---|
| 164 | res "universe/actor/universe.s3d_actor_run"
|
---|
| 165 | net_imprint 1
|
---|
| 166 | }
|
---|
| 167 | }
|
---|
| 168 | {
|
---|
| 169 | // External file describing the structure of each link:
|
---|
| 170 | ident "kit_base.extern"
|
---|
| 171 | param
|
---|
| 172 | {
|
---|
| 173 | // Delegate action calls to the child:
|
---|
| 174 | active 1
|
---|
| 175 | res "server/actor/serverlink.s3d_actor_run"
|
---|
| 176 | }
|
---|
| 177 | }
|
---|
| 178 | {
|
---|
| 179 | // Create a network engine.
|
---|
| 180 | ident "kit_io.neteng"
|
---|
| 181 | param
|
---|
| 182 | {
|
---|
| 183 | active 1
|
---|
| 184 | name "neteng"
|
---|
| 185 | // Get parameters from the actor "cfg",
|
---|
| 186 | // which is defined above.
|
---|
| 187 | extcfg_actor "^cfg"
|
---|
| 188 | // Get the parameters from the "network" entry.
|
---|
| 189 | extcfg_entry_param "network"
|
---|
| 190 | given_array
|
---|
| 191 | {
|
---|
| 192 | item "^env"
|
---|
| 193 | given_ident "env"
|
---|
| 194 | }
|
---|
| 195 | }
|
---|
| 196 | }
|
---|
| 197 | {
|
---|
| 198 | // Actor waiting for connections from clients:
|
---|
| 199 | ident "kit_engbase.pluglisten"
|
---|
| 200 | param
|
---|
| 201 | {
|
---|
| 202 | name "pluglisten"
|
---|
| 203 | neteng "neteng"
|
---|
| 204 | link_producer "link_producer"
|
---|
| 205 | extcfg_actor "^cfg"
|
---|
| 206 | extcfg_entry_addr "server.addr"
|
---|
| 207 | }
|
---|
| 208 | }
|
---|
| 209 | {
|
---|
| 210 | ident "kit_base.onaction"
|
---|
| 211 | param
|
---|
| 212 | {
|
---|
| 213 | active 1
|
---|
| 214 | target "pluglisten"
|
---|
| 215 | cmd "check"
|
---|
| 216 | }
|
---|
| 217 | }
|
---|
| 218 | {
|
---|
| 219 | ident "kit_base.onaction"
|
---|
| 220 | param
|
---|
| 221 | {
|
---|
| 222 | active 1
|
---|
| 223 | target "link_set"
|
---|
| 224 | cmd "poll_send"
|
---|
| 225 | }
|
---|
| 226 | }
|
---|
| 227 |
|
---|
| 228 | }
|
---|
| 229 | }
|
---|