X-Git-Url: https://de.git.xonotic.org/?p=voretournament%2Fvoretournament.git;a=blobdiff_plain;f=data%2Fqcsrc%2Fserver%2Fg_world.qc;h=ababcf9357ba377b5b54941352a20596caea085f;hp=024281035a44922112443e039577fafe7d287c56;hb=1ac0f2ca0a34ee209003526d0d5e19ece5e500e1;hpb=581d320e29b70e646c11196aaeb14316ea014305 diff --git a/data/qcsrc/server/g_world.qc b/data/qcsrc/server/g_world.qc index 02428103..ababcf93 100644 --- a/data/qcsrc/server/g_world.qc +++ b/data/qcsrc/server/g_world.qc @@ -49,13 +49,13 @@ void OtherPLReport_Think() WriteByte(MSG_BROADCAST, SVC_TEMPENTITY); WriteByte(MSG_BROADCAST, TE_CSQC_OTHERPLREPORT); WriteByte(MSG_BROADCAST, self.cnt); - if(e.eater.classname == "player") // tempt hackers less by only sending the info of eaten players + if(e.stat_eaten) // tempt hackers less by only sending the info of eaten players { - if(cvar("g_vore_showpreyhealth")) + if(cvar("g_vore_showhealth")) WriteByte(MSG_BROADCAST, e.health); else WriteByte(MSG_BROADCAST, 0); - WriteByte(MSG_BROADCAST, num_for_edict(e.eater)); + WriteByte(MSG_BROADCAST, num_for_edict(e.predator)); } else { @@ -654,11 +654,19 @@ void spawnfunc_worldspawn (void) addstat(STAT_DAMAGE_FIRED, AS_INT, stat_fired); addstat(STAT_SHOTORG, AS_INT, stat_shotorg); addstat(STAT_LEADLIMIT, AS_FLOAT, stat_leadlimit); - addstat(STAT_BULLETS_LOADED, AS_INT, campingrifle_bulletcounter); - addstat(STAT_STOMACH_LOAD, AS_INT, stat_stomachload); - addstat(STAT_STOMACH_DIGESTING, AS_INT, stat_digesting); - addstat(STAT_STOMACH_EATEN, AS_INT, stat_eaten); - + addstat(STAT_WEAPON_CLIPLOAD, AS_INT, clip_load); + addstat(STAT_WEAPON_CLIPSIZE, AS_INT, clip_size); + addstat(STAT_LAST_PICKUP, AS_FLOAT, last_pickup); + addstat(STAT_WINNING, AS_FLOAT, winning); + addstat(STAT_VORE_LOAD, AS_INT, stat_stomachload); + addstat(STAT_VORE_CANSWALLOW, AS_INT, stat_canswallow); + addstat(STAT_VORE_DIGESTING, AS_INT, stat_digesting); + addstat(STAT_VORE_EATEN, AS_INT, stat_eaten); + addstat(STAT_VORE_CANLEAVE, AS_INT, stat_canleave); + addstat(STAT_SBRING1_TYPE, AS_INT, stat_sbring1_type); + addstat(STAT_SBRING1_CLIP, AS_FLOAT, stat_sbring1_clip); + addstat(STAT_SBRING2_TYPE, AS_INT, stat_sbring2_type); + addstat(STAT_SBRING2_CLIP, AS_FLOAT, stat_sbring2_clip); next_pingtime = time + 5; InitializeEntity(self, cvar_changes_init, INITPRIO_CVARS); @@ -720,6 +728,8 @@ void spawnfunc_worldspawn (void) CheatInit(); localcmd("\n_sv_hook_gamestart ", GetGametype(), ";"); + if(cvar("g_campaign")) + localcmd("\n_sv_hook_campaign_gamestart ", GetGametype(), ";"); world_initialized = 1; } @@ -1044,9 +1054,14 @@ float DoNextMapOverride() { if(cvar("g_campaign")) { - CampaignPostIntermission(); - alreadychangedlevel = TRUE; - return TRUE; + if(cvar("g_campaign_changelevel")) + { + CampaignPostIntermission(); + alreadychangedlevel = TRUE; + return TRUE; + } + else + localcmd("togglemenu 1\n"); } if(cvar("quit_when_empty")) { @@ -1157,7 +1172,7 @@ void IntermissionThink() return; if(!mapvote_initialized) - if (time < intermission_exittime + 10 && !self.BUTTON_ATCK && !self.BUTTON_JUMP && !self.BUTTON_ATCK2 && !self.BUTTON_GRABBER && !self.BUTTON_USE) + if (time < intermission_exittime + 10 && !self.BUTTON_ATCK && !self.BUTTON_JUMP && !self.BUTTON_ATCK2 && !self.BUTTON_JETPACK && !self.BUTTON_USE) return; MapVote_Start(); @@ -1325,7 +1340,6 @@ void DumpStats(float final) void FixIntermissionClient(entity e) { - string s; if(!e.autoscreenshot) // initial call { e.angles = e.v_angle; @@ -1345,9 +1359,6 @@ void FixIntermissionClient(entity e) if(clienttype(e) == CLIENTTYPE_REAL) { stuffcmd(e, "\nscr_printspeed 1000000\n"); - s = cvar_string("sv_intermission_cdtrack"); - if(s != "") - stuffcmd(e, strcat("\ncd loop ", s, "\n")); msg_entity = e; WriteByte(MSG_ONE, SVC_INTERMISSION); } @@ -1448,6 +1459,8 @@ void NextLevel() CampaignPreIntermission(); localcmd("\nsv_hook_gameend;"); + if(cvar("g_campaign")) + localcmd("\nsv_hook_campaign_gameend;"); } /* @@ -2219,6 +2232,9 @@ void MapVote_Init() float i; float nmax, smax; + if(cvar("g_campaign")) + return; + MapVote_ClearAllVotes(); mapvote_count = 0;