X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Fserver%2Fg_world.qc;h=da2983c4a20d98cbaba575bbfd87005f22004938;hb=ae2c1407ec9a05e4f501a6604a7cce8e1030df9f;hp=79e574c83836119b48ae26cc491a220937b1651c;hpb=8643336b62c2c2881987dabddc842a0214839012;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 79e574c83..da2983c4a 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -23,9 +23,11 @@ #include "../common/buffs.qh" #include "../common/constants.qh" #include "../common/deathtypes.qh" +#include "../common/effects.qh" #include "../common/mapinfo.qh" #include "../common/monsters/all.qh" #include "../common/monsters/sv_monsters.qh" +#include "../common/vehicles/vehicles.qh" #include "../common/notifications.qh" #include "../common/playerstats.qh" #include "../common/stats.qh" @@ -559,13 +561,11 @@ void spawnfunc___init_dedicated_server(void) self.classname = "worldspawn"; // safeguard against various stuff ;) // needs to be done so early because of the constants they create - CALL_ACCUMULATED_FUNCTION(RegisterWeapons); - CALL_ACCUMULATED_FUNCTION(RegisterMonsters); - CALL_ACCUMULATED_FUNCTION(RegisterItems); - CALL_ACCUMULATED_FUNCTION(RegisterGametypes); + static_init(); CALL_ACCUMULATED_FUNCTION(RegisterNotifications); CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes); - CALL_ACCUMULATED_FUNCTION(RegisterBuffs); + CALL_ACCUMULATED_FUNCTION(RegisterEffects); + CALL_ACCUMULATED_FUNCTION(RegisterVehicles); MapInfo_Enumerate(); MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0); @@ -610,13 +610,11 @@ void spawnfunc_worldspawn (void) server_is_dedicated = (stof(cvar_defstring("is_dedicated")) ? true : false); // needs to be done so early because of the constants they create - CALL_ACCUMULATED_FUNCTION(RegisterWeapons); - CALL_ACCUMULATED_FUNCTION(RegisterMonsters); - CALL_ACCUMULATED_FUNCTION(RegisterItems); - CALL_ACCUMULATED_FUNCTION(RegisterGametypes); + static_init(); CALL_ACCUMULATED_FUNCTION(RegisterNotifications); CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes); - CALL_ACCUMULATED_FUNCTION(RegisterBuffs); + CALL_ACCUMULATED_FUNCTION(RegisterEffects); + CALL_ACCUMULATED_FUNCTION(RegisterVehicles); ServerProgsDB = db_load(strcat("server.db", autocvar_sessionid)); @@ -698,8 +696,7 @@ void spawnfunc_worldspawn (void) GameLogEcho(strcat(":gamestart:", GetGametype(), "_", GetMapname(), ":", s)); s = ":gameinfo:mutators:LIST"; - ret_string = s; - MUTATOR_CALLHOOK(BuildMutatorsString); + MUTATOR_CALLHOOK(BuildMutatorsString, s); s = ret_string; // simple, probably not good in the mutator system @@ -786,6 +783,7 @@ void spawnfunc_worldspawn (void) WeaponStats_Init(); WepSet_AddStat(); + WepSet_AddStat_InMap(); addstat(STAT_SWITCHWEAPON, AS_INT, switchweapon); addstat(STAT_SWITCHINGWEAPON, AS_INT, switchingweapon); addstat(STAT_GAMESTARTTIME, AS_FLOAT, stat_game_starttime);