X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fg_world.qc;h=b202f284f6b664903899c35c0514824928592481;hp=4f3356b65f5aab455b58e95ece3312f3ca0f57ca;hb=a39af09cb4b15ec94461af2c1f314098ffe7ce0c;hpb=3a035cb2732af064519135410c5664c2e1b3f501 diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 4f3356b65f..b202f284f6 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -3,7 +3,6 @@ #include "anticheat.qh" #include "antilag.qh" -#include "bot/bot.qh" #include "campaign.qh" #include "cheats.qh" #include "cl_client.qh" @@ -19,10 +18,10 @@ #include "scores.qh" #include "teamplay.qh" #include "weapons/weaponstats.qh" -#include "../common/buffs.qh" +#include "../common/buffs/all.qh" #include "../common/constants.qh" #include "../common/deathtypes.qh" -#include "../common/effects.qh" +#include "../common/effects/effects.qh" #include "../common/mapinfo.qh" #include "../common/monsters/all.qh" #include "../common/monsters/sv_monsters.qh" @@ -512,8 +511,8 @@ void detect_maptype() } entity randomseed; -float RandomSeed_Send(entity to, int sf) -{SELFPARAM(); +bool RandomSeed_Send(entity this, entity to, int sf) +{ WriteByte(MSG_ENTITY, ENT_CLIENT_RANDOMSEED); WriteShort(MSG_ENTITY, self.cnt); return true; @@ -531,12 +530,11 @@ void RandomSeed_Spawn() randomseed.think = RandomSeed_Think; Net_LinkEntity(randomseed, false, 0, RandomSeed_Send); - SELFCALL(randomseed, randomseed.think()); // sets random seed and nextthink - SELFCALL_DONE(); + WITH(entity, self, randomseed, randomseed.think()); // sets random seed and nextthink } -void spawnfunc___init_dedicated_server(void) -{SELFPARAM(); +spawnfunc(__init_dedicated_server) +{ // handler for _init/_init map (only for dedicated server initialization) world_initialized = -1; // don't complain @@ -558,7 +556,6 @@ void spawnfunc___init_dedicated_server(void) // needs to be done so early because of the constants they create static_init(); - CALL_ACCUMULATED_FUNCTION(RegisterTurrets); CALL_ACCUMULATED_FUNCTION(RegisterNotifications); CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes); @@ -573,8 +570,8 @@ void ClientInit_Spawn(); void WeaponStats_Init(); void WeaponStats_Shutdown(); void Physics_AddStats(); -void spawnfunc_worldspawn (void) -{SELFPARAM(); +spawnfunc(worldspawn) +{ float fd, l, j, n; string s; @@ -605,12 +602,9 @@ void spawnfunc_worldspawn (void) // needs to be done so early because of the constants they create static_init(); - CALL_ACCUMULATED_FUNCTION(RegisterTurrets); CALL_ACCUMULATED_FUNCTION(RegisterNotifications); CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes); - initialize_minigames(); - ServerProgsDB = db_load(strcat("server.db", autocvar_sessionid)); TemporaryDB = db_create(); @@ -663,7 +657,6 @@ void spawnfunc_worldspawn (void) PlayerStats_GameReport_Init(); // we need this to be initiated before InitGameplayMode - precache_model ("null"); // we need this one before InitGameplayMode InitGameplayMode(); readlevelcvars(); GrappleHookInit(); @@ -694,10 +687,6 @@ void spawnfunc_worldspawn (void) MUTATOR_CALLHOOK(BuildMutatorsString, s); s = ret_string; - // simple, probably not good in the mutator system - if(autocvar_g_grappling_hook) - s = strcat(s, ":grappling_hook"); - // initialiation stuff, not good in the mutator system if(!autocvar_g_use_ammunition) s = strcat(s, ":no_use_ammunition"); @@ -922,8 +911,8 @@ void spawnfunc_worldspawn (void) world_initialized = 1; } -void spawnfunc_light (void) -{SELFPARAM(); +spawnfunc(light) +{ //makestatic (self); // Who the f___ did that? remove(self); } @@ -1010,22 +999,6 @@ string Map_Filename(float position) return strcat("maps/", argv(position), ".bsp"); } -string strwords(string s, float w) -{ - float endpos; - for(endpos = 0; w && endpos >= 0; --w) - endpos = strstrofs(s, " ", endpos + 1); - if(endpos < 0) - return s; - else - return substring(s, 0, endpos); -} - -float strhasword(string s, string w) -{ - return strstrofs(strcat(" ", s, " "), strcat(" ", w, " "), 0) >= 0; -} - void Map_MarkAsRecent(string m) { cvar_set("g_maplist_mostrecent", strwords(strcat(m, " ", autocvar_g_maplist_mostrecent), max(0, autocvar_g_maplist_mostrecent_count))); @@ -1724,8 +1697,7 @@ float WinningCondition_Assault() } else { - SELFCALL(ent, assault_new_round()); - SELFCALL_DONE(); + WITH(entity, self, ent, assault_new_round()); } } }