X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fg_world.qc;h=a5165706bae3f9351e22be5d9b48a2f571a79f16;hb=84f2a6cddce774e25f31050e71992c00a755e171;hp=c815b0815a8539690c0c882f2b0e9b5a7663e6f5;hpb=d6bc3b20a5d8977eae46b6af38191e178aeaae8d;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index c815b0815..a5165706b 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -635,6 +635,11 @@ void spawnfunc_worldspawn (void) addstat(STAT_LEADLIMIT, AS_FLOAT, stat_leadlimit); addstat(STAT_BULLETS_LOADED, AS_INT, campingrifle_bulletcounter); + // g_movementspeed hack + addstat(STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW, AS_FLOAT, stat_sv_airspeedlimit_nonqw); + addstat(STAT_MOVEVARS_AIRACCEL_QW, AS_FLOAT, stat_sv_airaccel_qw); + addstat(STAT_MOVEVARS_AIRSTRAFEACCEL_QW, AS_FLOAT, stat_sv_airstrafeaccel_qw); + next_pingtime = time + 5; InitializeEntity(self, cvar_changes_init, INITPRIO_CVARS); @@ -694,7 +699,7 @@ void spawnfunc_worldspawn (void) CheatInit(); - localcmd("\n_sv_hook_gamestart ", GetGametype(), ";"); + localcmd("\n_sv_hook_gamestart ", GetGametype(), "\n"); world_initialized = 1; } @@ -1422,7 +1427,7 @@ void NextLevel() if(cvar("g_campaign")) CampaignPreIntermission(); - localcmd("\nsv_hook_gameend;"); + localcmd("\nsv_hook_gameend\n"); } /* @@ -1735,6 +1740,8 @@ void ShuffleMaplist() float leaderfrags; float WinningCondition_Scores(float limit, float leadlimit) { + float limitreached; + // TODO make everything use THIS winning condition (except LMS) WinningConditionHelper(); @@ -1779,13 +1786,22 @@ float WinningCondition_Scores(float limit, float leadlimit) } } + limitreached = FALSE; + if(limit) + if(WinningConditionHelper_topscore >= limit) + limitreached = TRUE; + if(leadlimit) + { + float leadlimitreached; + leadlimitreached = (WinningConditionHelper_topscore - WinningConditionHelper_secondscore >= leadlimit); + if(cvar("leadlimit_and_fraglimit")) + limitreached = (limitreached && leadlimitreached); + else + limitreached = (limitreached || leadlimitreached); + } + return GetWinningCode( - WinningConditionHelper_topscore && - ( - (limit && (WinningConditionHelper_topscore >= limit)) - || - (leadlimit && (WinningConditionHelper_topscore - WinningConditionHelper_secondscore >= leadlimit)) - ), + WinningConditionHelper_topscore && limitreached, WinningConditionHelper_equality ); }