X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=data%2Fqcsrc%2Fserver%2Fg_world.qc;h=93a16bdd98c9b75bc714caacb553087c850c872f;hb=cc045f9d09b57e3ce32ee45f807b18438e410380;hp=e3e225e0464900fbb78376205001fbda362a3cca;hpb=f6fb313876957ca2270250111ba2bb5f9f4024a6;p=voretournament%2Fvoretournament.git diff --git a/data/qcsrc/server/g_world.qc b/data/qcsrc/server/g_world.qc index e3e225e0..93a16bdd 100644 --- a/data/qcsrc/server/g_world.qc +++ b/data/qcsrc/server/g_world.qc @@ -49,17 +49,17 @@ void OtherPLReport_Think() WriteByte(MSG_BROADCAST, SVC_TEMPENTITY); WriteByte(MSG_BROADCAST, TE_CSQC_OTHERPLREPORT); WriteByte(MSG_BROADCAST, self.cnt); - if(e.predator.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")) - WriteByte(MSG_BROADCAST, e.health); + if(cvar("g_vore_showhealth")) + WriteShort(MSG_BROADCAST, e.health); // not WriteByte because we show minus health too else - WriteByte(MSG_BROADCAST, 0); + WriteShort(MSG_BROADCAST, 0); WriteByte(MSG_BROADCAST, num_for_edict(e.predator)); } else { - WriteByte(MSG_BROADCAST, 0); + WriteShort(MSG_BROADCAST, 0); WriteByte(MSG_BROADCAST, 0); } self.cnt = mod(self.cnt + 1, maxclients); @@ -654,11 +654,24 @@ 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_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_MAXLOAD, AS_INT, stat_stomachmaxload); + 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_VORE_PROGRESS_PREY, AS_FLOAT, swallow_progress_prey); + addstat(STAT_VORE_PROGRESS_PRED, AS_FLOAT, swallow_progress_pred); + addstat(STAT_CROSSHAIR_STYLE, AS_INT, stat_crosshair_style); + 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); + addstat(STAT_RESPAWN_TIME, AS_FLOAT, stat_respawn_time); next_pingtime = time + 5; InitializeEntity(self, cvar_changes_init, INITPRIO_CVARS); @@ -720,6 +733,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 +1059,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")) { @@ -1325,7 +1345,6 @@ void DumpStats(float final) void FixIntermissionClient(entity e) { - string s; if(!e.autoscreenshot) // initial call { e.angles = e.v_angle; @@ -1345,9 +1364,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 +1464,8 @@ void NextLevel() CampaignPreIntermission(); localcmd("\nsv_hook_gameend;"); + if(cvar("g_campaign")) + localcmd("\nsv_hook_campaign_gameend;"); } /* @@ -2219,6 +2237,9 @@ void MapVote_Init() float i; float nmax, smax; + if(cvar("g_campaign")) + return; + MapVote_ClearAllVotes(); mapvote_count = 0;