From f6fb313876957ca2270250111ba2bb5f9f4024a6 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Wed, 8 Sep 2010 18:49:00 +0300 Subject: [PATCH] eater -> predator, because that's a more correct word --- data/qcsrc/client/Main.qc | 2 +- data/qcsrc/client/main.qh | 2 +- data/qcsrc/client/sbar.qc | 8 +- data/qcsrc/server/bot/havocbot/havocbot.qc | 2 +- data/qcsrc/server/bot/havocbot/vore_ai.qc | 16 +-- data/qcsrc/server/cl_client.qc | 12 +- data/qcsrc/server/cl_physics.qc | 8 +- data/qcsrc/server/cl_player.qc | 16 +-- data/qcsrc/server/cl_weaponsystem.qc | 2 +- data/qcsrc/server/defs.qh | 2 +- data/qcsrc/server/g_grabber.qc | 6 +- data/qcsrc/server/g_violence.qc | 2 +- data/qcsrc/server/g_world.qc | 4 +- data/qcsrc/server/vore.qc | 126 ++++++++++----------- data/qcsrc/server/w_grabber.qc | 2 +- 15 files changed, 105 insertions(+), 105 deletions(-) diff --git a/data/qcsrc/client/Main.qc b/data/qcsrc/client/Main.qc index 42e3f8aa..5b5a2217 100644 --- a/data/qcsrc/client/Main.qc +++ b/data/qcsrc/client/Main.qc @@ -1210,7 +1210,7 @@ void Net_ReadOtherPLReport() if not(playerslots[e]) return; playerslots[e].plhealth = ph; - playerslots[e].pleater = pn; + playerslots[e].plpredator = pn; } void Net_VoteDialog(float highlight) { diff --git a/data/qcsrc/client/main.qh b/data/qcsrc/client/main.qh index c35f072c..13aa153b 100644 --- a/data/qcsrc/client/main.qh +++ b/data/qcsrc/client/main.qh @@ -172,4 +172,4 @@ float calledgrabbers; #define GRABBER_END 2 .float ping, ping_packetloss, ping_movementloss; -.float plhealth, pleater; +.float plhealth, plpredator; diff --git a/data/qcsrc/client/sbar.qc b/data/qcsrc/client/sbar.qc index 746861aa..9b3db2e2 100644 --- a/data/qcsrc/client/sbar.qc +++ b/data/qcsrc/client/sbar.qc @@ -1003,7 +1003,7 @@ void Sbar_PrintStomachboardItem(vector pos, entity pl) float fieldcounter2; void Sbar_PrintStomachboardItemPred(vector pos, entity pl) { - // shows the name of our eater + // shows the name of our predator string str; float f, field, field_number; @@ -2987,13 +2987,13 @@ void Sbar_Draw (void) continue; if(getstati(STAT_VORE_EATEN)) - f = pl.pleater == getstati(STAT_VORE_EATEN); + f = pl.plpredator == getstati(STAT_VORE_EATEN); else { if(spectatee_status) - f = pl.pleater == spectatee_status; + f = pl.plpredator == spectatee_status; else - f = pl.pleater == player_localentnum; + f = pl.plpredator == player_localentnum; } if(f) diff --git a/data/qcsrc/server/bot/havocbot/havocbot.qc b/data/qcsrc/server/bot/havocbot/havocbot.qc index 1c493edd..62aa1d27 100644 --- a/data/qcsrc/server/bot/havocbot/havocbot.qc +++ b/data/qcsrc/server/bot/havocbot/havocbot.qc @@ -16,7 +16,7 @@ void havocbot_ai() // execute the vore AI for bots Vore_AI(); - if(self.eater.classname == "player") + if(self.predator.classname == "player") return; // an eaten bot has nothing to do outside of the vore AI if (bot_strategytoken == self) diff --git a/data/qcsrc/server/bot/havocbot/vore_ai.qc b/data/qcsrc/server/bot/havocbot/vore_ai.qc index 00bd76c3..3e74edff 100644 --- a/data/qcsrc/server/bot/havocbot/vore_ai.qc +++ b/data/qcsrc/server/bot/havocbot/vore_ai.qc @@ -17,8 +17,8 @@ entity Swallow_distance_check_bot(entity e) float Swallow_condition_check_bot(entity prey) { // checks the necessary conditions for a bot to swallow another player - if(prey != self && prey.classname == "player" && prey.eater.classname != "player" && prey.deadflag == DEAD_NO && !prey.BUTTON_CHAT) // we can't swallow someone who's already in someone else's stomach - if(self.eater.classname != "player" && self.stomach_load < cvar("g_balance_vore_swallow_limit") && self.deadflag == DEAD_NO) // we can't swallow players while inside someone's stomach ourselves + if(prey != self && prey.classname == "player" && prey.predator.classname != "player" && prey.deadflag == DEAD_NO && !prey.BUTTON_CHAT) // we can't swallow someone who's already in someone else's stomach + if(self.predator.classname != "player" && self.stomach_load < cvar("g_balance_vore_swallow_limit") && self.deadflag == DEAD_NO) // we can't swallow players while inside someone's stomach ourselves if not(cvar("g_vore_biggergut") && prey.stomach_load > self.stomach_load) if(self.health > cvar("g_balance_vore_kick_damage_max")) // explained below return TRUE; @@ -43,7 +43,7 @@ void Vore_AI_Teamheal(entity prey) if not(teams_matter && cvar("g_balance_vore_teamheal")) return; - if(self.deadflag != DEAD_NO || self.eater.classname == "player" || self.flagcarried || self.digesting) // a flag carrier can't waste time on team healing + if(self.deadflag != DEAD_NO || self.predator.classname == "player" || self.flagcarried || self.digesting) // a flag carrier can't waste time on team healing { self.status_teamhealing = 0; return; @@ -56,7 +56,7 @@ void Vore_AI_Teamheal(entity prey) FOR_EACH_PLAYER(head) { - if(head.eater == self) + if(head.predator == self) if(head.team != self.team) { self.status_teamhealing = 0; // there's a foe in our stomach, we can't teamheal now @@ -73,7 +73,7 @@ void Vore_AI_Teamheal(entity prey) // not sure if this should be merged with the FOR_EACH_PLAYER check above. That would save an extra loop, but would be less correct FOR_EACH_PLAYER(head) { - if(head.eater == self) // head is automatically a team mate, or we wouldn't be reaching this part of the code + if(head.predator == self) // head is automatically a team mate, or we wouldn't be reaching this part of the code if(head.health >= cvar("g_balance_vore_teamheal_stable")) self.BUTTON_REGURGITATE = TRUE; // release the team mate } @@ -162,9 +162,9 @@ void Vore_AI() // -------------------------------- // all we can do in the stomach is kick and do some damage / try to escape, or leave if the circumstances allow it and we should - if(self.eater.classname == "player" && time > self.decide_delay2) + if(self.predator.classname == "player" && time > self.decide_delay2) { - if not(teams_matter && self.team == self.eater.team) + if not(teams_matter && self.team == self.predator.team) { // the higher the skill, the more the bot will kick in your stomack if(skill >= random_try) @@ -174,7 +174,7 @@ void Vore_AI() // if a bot can willingly leave the predator, do so unless there's a reason not to if(self.stat_canleave) - if not(teams_matter && self.team == self.eater.team && cvar("g_balance_vore_teamheal") && self.health < cvar("g_balance_vore_teamheal_stable")) // we are being team healed, don't leave + if not(teams_matter && self.team == self.predator.team && cvar("g_balance_vore_teamheal") && self.health < cvar("g_balance_vore_teamheal_stable")) // we are being team healed, don't leave self.BUTTON_JUMP = TRUE; self.decide_delay2 = time + decide_prey; // time before the bot decides what to do with their predator diff --git a/data/qcsrc/server/cl_client.qc b/data/qcsrc/server/cl_client.qc index c369b3ef..6e425a67 100644 --- a/data/qcsrc/server/cl_client.qc +++ b/data/qcsrc/server/cl_client.qc @@ -510,20 +510,20 @@ float Client_customizeentityforclient() #endif // now change the predator's player model into a stomach model for the prey - // in other words, when a player is swallowed by another player, the eater becomes an inward stomach model so the prey can see theirself in the stomach + // in other words, when a player is swallowed by another player, the predator becomes an inward stomach model so the prey can see theirself in the stomach // this is only visible to the prey however, otherwise players would appear as a floating stomach to everyone (ewww) // don't do this if we have chase_active enabled, as we'd be seeing a floating stomach from third person view if(other.cvar_chase_active > 0 || other.classname == "observer") // the classname check prevents a bug { Client_setmodel(setmodel_state()); - if not(self.eater.classname == "player") + if not(self.predator.classname == "player") self.alpha = default_player_alpha; return TRUE; } if(other.spectatee_status) other = other.enemy; // also do this for the player we are spectating - if(other.eater == self) + if(other.predator == self) { tokenizebyseparator(self.playermodel, "."); Client_setmodel(strcat(argv(0), "_stomach.md3")); @@ -531,7 +531,7 @@ float Client_customizeentityforclient() return TRUE; } Client_setmodel(setmodel_state()); - if not(self.eater.classname == "player") + if not(self.predator.classname == "player") self.alpha = default_player_alpha; return TRUE; } @@ -1594,7 +1594,7 @@ void ChatBubbleThink() remove(self); return; } - if ((self.owner.BUTTON_CHAT && !self.owner.deadflag && self.owner.eater.classname != "player") + if ((self.owner.BUTTON_CHAT && !self.owner.deadflag && self.owner.predator.classname != "player") #ifdef TETRIS || self.owner.tetris_on #endif @@ -1637,7 +1637,7 @@ void TeamBubbleThink() return; } // setorigin(self, self.owner.origin + '0 0 15' + self.owner.maxs_z * '0 0 1'); // bandwidth hog. setattachment does this now - if (self.owner.BUTTON_CHAT || self.owner.deadflag || self.owner.killindicator || self.owner.eater.classname == "player") + if (self.owner.BUTTON_CHAT || self.owner.deadflag || self.owner.killindicator || self.owner.predator.classname == "player") self.model = ""; else { diff --git a/data/qcsrc/server/cl_physics.qc b/data/qcsrc/server/cl_physics.qc index 3b6ca108..81c2afc1 100644 --- a/data/qcsrc/server/cl_physics.qc +++ b/data/qcsrc/server/cl_physics.qc @@ -697,7 +697,7 @@ void SV_PlayerPhysics() } } - if(self.eater.classname == "player") + if(self.predator.classname == "player") return; if (self.movetype == MOVETYPE_NONE) @@ -902,7 +902,7 @@ void SV_PlayerPhysics() PM_Accelerate(wishdir, wishspeed, wishspeed, sv_accelerate*maxspd_mod, 1, 0); } } - else if ((self.items & IT_JETPACK) && self.BUTTON_JETPACK && (!cvar("g_jetpack_fuel") || self.ammo_fuel >= 0.01 || self.items & IT_UNLIMITED_WEAPON_AMMO) && self.eater.classname != "player") + else if ((self.items & IT_JETPACK) && self.BUTTON_JETPACK && (!cvar("g_jetpack_fuel") || self.ammo_fuel >= 0.01 || self.items & IT_UNLIMITED_WEAPON_AMMO) && self.predator.classname != "player") { //makevectors(self.v_angle_y * '0 1 0'); makevectors(self.v_angle); @@ -1004,7 +1004,7 @@ void SV_PlayerPhysics() else if (self.flags & FL_ONGROUND) { // we get here if we ran out of ammo - if((self.items & IT_JETPACK) && self.BUTTON_JETPACK && !(buttons_prev & 32) && self.eater.classname != "player") + if((self.items & IT_JETPACK) && self.BUTTON_JETPACK && !(buttons_prev & 32) && self.predator.classname != "player") sprint(self, "You don't have any fuel for the ^2Jetpack\n"); // walking @@ -1065,7 +1065,7 @@ void SV_PlayerPhysics() { float wishspeed0; // we get here if we ran out of ammo - if((self.items & IT_JETPACK) && self.BUTTON_JETPACK && !(buttons_prev & 32) && self.eater.classname != "player") + if((self.items & IT_JETPACK) && self.BUTTON_JETPACK && !(buttons_prev & 32) && self.predator.classname != "player") sprint(self, "You don't have any fuel for the ^2Jetpack\n"); if(maxspd_mod < 1) diff --git a/data/qcsrc/server/cl_player.qc b/data/qcsrc/server/cl_player.qc index a12a43bd..26b50d44 100644 --- a/data/qcsrc/server/cl_player.qc +++ b/data/qcsrc/server/cl_player.qc @@ -746,10 +746,10 @@ void UpdateSelectedPlayer() selected = world; selected_score = 0.95; // 18 degrees - if(self.eater.classname == "player") + if(self.predator.classname == "player") { if(!self.dropweapon_check) - if(self.eater.team != self.team) // don't disarm team mates when swallowing them + if(self.predator.team != self.team) // don't disarm team mates when swallowing them if(random() < cvar("g_vore_dropweapon")) SpawnThrownWeapon (self.origin + (self.mins + self.maxs) * 0.5, self.switchweapon); self.dropweapon_check = TRUE; @@ -1230,7 +1230,7 @@ void GlobalSound(string sample, float chan, float voicetype) { if(msg_entity.cvar_cl_voice_directional == 1) { - if(self.eater.classname == "player") + if(self.predator.classname == "player") soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE * bound(0, cvar("g_vore_soundocclusion"), 1), ATTN_MIN); else soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN); @@ -1249,7 +1249,7 @@ void GlobalSound(string sample, float chan, float voicetype) { if(msg_entity.cvar_cl_voice_directional == 1) { - if(self.eater.classname == "player") + if(self.predator.classname == "player") soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE * bound(0, cvar("g_vore_soundocclusion"), 1), ATTN_MIN); else soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN); @@ -1268,7 +1268,7 @@ void GlobalSound(string sample, float chan, float voicetype) { if(msg_entity.cvar_cl_voice_directional == 1) { - if(self.eater.classname == "player") + if(self.predator.classname == "player") soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE * bound(0, cvar("g_vore_soundocclusion"), 1), ATTN_MIN); else soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN); @@ -1290,7 +1290,7 @@ void GlobalSound(string sample, float chan, float voicetype) { if (msg_entity.cvar_cl_voice_directional >= 1) { - if(self.eater.classname == "player") + if(self.predator.classname == "player") soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE * bound(0, cvar("g_vore_soundocclusion"), 1), bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX)); else soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX)); @@ -1311,7 +1311,7 @@ void GlobalSound(string sample, float chan, float voicetype) { if (msg_entity.cvar_cl_voice_directional >= 1) { - if(self.eater.classname == "player") + if(self.predator.classname == "player") soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE * bound(0, cvar("g_vore_soundocclusion"), 1), bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX)); else soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX)); @@ -1320,7 +1320,7 @@ void GlobalSound(string sample, float chan, float voicetype) soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE); } case VOICETYPE_PLAYERSOUND: - if(self.eater.classname == "player") + if(self.predator.classname == "player") sound(self, chan, sample, VOL_BASE * bound(0, cvar("g_vore_soundocclusion"), 1), ATTN_NORM); else sound(self, chan, sample, VOL_BASE, ATTN_NORM); diff --git a/data/qcsrc/server/cl_weaponsystem.qc b/data/qcsrc/server/cl_weaponsystem.qc index 3430c1a9..2e854b65 100644 --- a/data/qcsrc/server/cl_weaponsystem.qc +++ b/data/qcsrc/server/cl_weaponsystem.qc @@ -262,7 +262,7 @@ float CL_ExteriorWeaponentity_CustomizeEntityForClient() } if(other.spectatee_status) other = other.enemy; // also do this for the player we are spectating - if(other.eater == self.owner) + if(other.predator == self.owner) { setmodel(self, ""); return TRUE; diff --git a/data/qcsrc/server/defs.qh b/data/qcsrc/server/defs.qh index 9e6a63fb..92debac8 100644 --- a/data/qcsrc/server/defs.qh +++ b/data/qcsrc/server/defs.qh @@ -65,7 +65,7 @@ float maxclients; // Vore functions -.entity eater; +.entity predator; .float digesting; .float stomach_load; .float weapon_delay; diff --git a/data/qcsrc/server/g_grabber.qc b/data/qcsrc/server/g_grabber.qc index df3591c7..28b687e5 100644 --- a/data/qcsrc/server/g_grabber.qc +++ b/data/qcsrc/server/g_grabber.qc @@ -132,12 +132,12 @@ void GrabberThink() WarpZone_RefSys_AddIncrementally(self, self.aiment); // prevent the grabber from sticking to a player that has been swallowed - if(self.aiment.eater.classname == "player") + if(self.aiment.predator.classname == "player") { // if the grabber is linked to a player that we swallowed, disconnect it (or the grabber will stick to us / the player inside us) // otherwise, link the grabber to the player who ate our linked player - if(self.aiment.eater != self.owner) - SetMovetypeFollow(self, self.aiment.eater); + if(self.aiment.predator != self.owner) + SetMovetypeFollow(self, self.aiment.predator); else RemoveGrabber(self.owner); } diff --git a/data/qcsrc/server/g_violence.qc b/data/qcsrc/server/g_violence.qc index a6c6d8b0..7bc550dc 100644 --- a/data/qcsrc/server/g_violence.qc +++ b/data/qcsrc/server/g_violence.qc @@ -13,7 +13,7 @@ float Violence_GibSplash_SendEntity(entity to, float sf) // TODO maybe convert this to a TE? void Violence_GibSplash_At(vector org, vector dir, float type, float amount, entity gibowner, entity attacker) { - if(gibowner.eater.classname == "player") + if(gibowner.predator.classname == "player") return; // you can't bleed or gib outside of the stomach entity e; diff --git a/data/qcsrc/server/g_world.qc b/data/qcsrc/server/g_world.qc index 3c1fb34d..e3e225e0 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.predator.classname == "player") // tempt hackers less by only sending the info of eaten players { if(cvar("g_vore_showpreyhealth")) 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 { diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index 48cfd3f6..9526959b 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -25,8 +25,8 @@ entity Swallow_distance_check() float Swallow_condition_check(entity prey) { // checks the necessary conditions for swallowing another player - if(prey.classname == "player" && prey.eater.classname != "player" && prey.deadflag == DEAD_NO) // we can't swallow someone who's already in someone else's stomach - if(self.classname == "player" && self.eater.classname != "player" && self.deadflag == DEAD_NO) // we can't swallow players while inside someone's stomach ourselves + if(prey.classname == "player" && prey.predator.classname != "player" && prey.deadflag == DEAD_NO) // we can't swallow someone who's already in someone else's stomach + if(self.classname == "player" && self.predator.classname != "player" && self.deadflag == DEAD_NO) // we can't swallow players while inside someone's stomach ourselves if not(vlen(self.velocity) > cvar("g_balance_vore_regurgitate_velocitylimit")) { if(self.stomach_load >= cvar("g_balance_vore_swallow_limit")) @@ -58,7 +58,7 @@ float Swallow_condition_check(entity prey) float Vore_PreyCanLeave() { - if(teams_matter && self.team == self.eater.team) + if(teams_matter && self.team == self.predator.team) return TRUE; return FALSE; } @@ -73,7 +73,7 @@ void Vore_CameraEffect_Set(entity e) } void Vore_CameraEffect_Apply() { - if(self.eater.classname != "player") + if(self.predator.classname != "player") return; if(self.cvar_cl_vore_cameraspeed) @@ -113,40 +113,40 @@ void Vore_Swallow(entity e) e.vore_oldsolid = e.solid; e.vore_oldview_ofs_z = e.view_ofs_z; - e.eater = self; - setorigin(e, e.eater.origin); + e.predator = self; + setorigin(e, e.predator.origin); e.velocity = '0 0 0'; e.movetype = MOVETYPE_FOLLOW; e.solid = SOLID_NOT; e.alpha = -1; // best way of hiding / showing the eaten player - e.aiment = e.eater; // follow the predator. Is automatically unset + e.aiment = e.predator; // follow the predator. Is automatically unset // drop keys (KH) and flags (CTF) when we get swallowed kh_Key_DropAll(e, FALSE); if(e.flagcarried) - DropFlag(e.flagcarried, world, e.eater); + DropFlag(e.flagcarried, world, e.predator); Vore_CameraEffect_Set(e); if(stov(cvar_string("g_vore_regurgitatecolor_released"))) e.colormod = stov(cvar_string("g_vore_regurgitatecolor_released")); - if(e.team == e.eater.team && teamplay) + if(e.team == e.predator.team && teamplay) { centerprint(e, "^3You have been swallowed by a team mate, don't kick!"); - centerprint(e.eater, "^3You have swallowed a team mate, use caution!"); + centerprint(e.predator, "^3You have swallowed a team mate, use caution!"); } - PlayerSound(e.eater, playersound_swallow, CHAN_PAIN, VOICETYPE_PLAYERSOUND); - setanim(e.eater, e.eater.anim_pain1, FALSE, TRUE, TRUE); // looks good for swallowing / regurgitating - e.eater.stomach_load += 1; - e.eater.regurgitate_prepare = 0; - Vore_Weight_apply(e.eater); + PlayerSound(e.predator, playersound_swallow, CHAN_PAIN, VOICETYPE_PLAYERSOUND); + setanim(e.predator, e.predator.anim_pain1, FALSE, TRUE, TRUE); // looks good for swallowing / regurgitating + e.predator.stomach_load += 1; + e.predator.regurgitate_prepare = 0; + Vore_Weight_apply(e.predator); // block firing for a small amount of time when voring, or we'll be firing the next frame after we swallow - e.eater.weapon_delay = time + button_delay; - e.eater.swallow_delay = time + cvar("g_balance_vore_swallow_delay"); - e.system_delay = e.eater.system_delay = time + system_delay_time; + e.predator.weapon_delay = time + button_delay; + e.predator.swallow_delay = time + cvar("g_balance_vore_swallow_delay"); + e.system_delay = e.predator.system_delay = time + system_delay_time; } void Vore_Regurgitate(entity e) @@ -163,28 +163,28 @@ void Vore_Regurgitate(entity e) oldforward = v_forward; oldright = v_right; oldup = v_up; - makevectors(e.eater.v_angle); + makevectors(e.predator.v_angle); e.velocity = v_forward * cvar("g_balance_vore_regurgitate_force"); - e.eater.velocity += -v_forward * cvar("g_balance_vore_regurgitate_eaterforce"); + e.predator.velocity += -v_forward * cvar("g_balance_vore_regurgitate_eaterforce"); v_forward = oldforward; v_right = oldright; v_up = oldup; - e.pusher = e.eater; // so we can frag players by regurgitating them in deadly pits + e.pusher = e.predator; // so we can frag players by regurgitating them in deadly pits e.pushltime = time + cvar("g_maxpushtime"); - PlayerSound(e.eater, playersound_regurgitate, CHAN_PAIN, VOICETYPE_PLAYERSOUND); - setanim(e.eater, e.eater.anim_pain1, FALSE, TRUE, TRUE); // looks good for swallowing / regurgitating - pointparticles(particleeffectnum("regurgitate"), e.eater.origin, '0 0 0', 1); - e.eater.stomach_load -= 1; - e.eater.regurgitate_prepare = 0; - e.eater.swallow_delay = time + cvar("g_balance_vore_swallow_delay"); - Vore_Weight_apply(e.eater); + PlayerSound(e.predator, playersound_regurgitate, CHAN_PAIN, VOICETYPE_PLAYERSOUND); + setanim(e.predator, e.predator.anim_pain1, FALSE, TRUE, TRUE); // looks good for swallowing / regurgitating + pointparticles(particleeffectnum("regurgitate"), e.predator.origin, '0 0 0', 1); + e.predator.stomach_load -= 1; + e.predator.regurgitate_prepare = 0; + e.predator.swallow_delay = time + cvar("g_balance_vore_swallow_delay"); + Vore_Weight_apply(e.predator); // block firing for a small amount of time when getting regurgitated, or we'll be firing the next frame e.weapon_delay = time + button_delay; - e.system_delay = e.eater.system_delay = time + system_delay_time; - e.eater = world; + e.system_delay = e.predator.system_delay = time + system_delay_time; + e.predator = world; } void Vore_Gurglesound(); @@ -193,12 +193,12 @@ void Vore_Disconnect() // frees prey from their predators when someone disconnects or goes spectating // prey disconnects or goes spectating while inside someone's belly: - if(self.eater.classname == "player") + if(self.predator.classname == "player") { self.view_ofs_z = self.vore_oldview_ofs_z; - self.eater.stomach_load -= 1; - Vore_Weight_apply(self.eater); - self.eater = world; + self.predator.stomach_load -= 1; + Vore_Weight_apply(self.predator); + self.predator = world; } // pred disconnects or goes spectating with players in their belly: @@ -207,7 +207,7 @@ void Vore_Disconnect() entity head; FOR_EACH_PLAYER(head) { - if(head.eater == self) + if(head.predator == self) Vore_Regurgitate(head); } Vore_Gurglesound(); // stop the gurgling sound @@ -218,18 +218,18 @@ void Vore_Disconnect() void Vore_Digest() { // apply digestion to prey - if(time > self.eater.digestion_step + steptime) + if(time > self.predator.digestion_step + steptime) { - Damage(self, self.eater, self.eater, cvar("g_balance_vore_digestion_damage"), DEATH_DIGESTION, self.origin, '0 0 0'); - if(cvar("g_balance_vore_digestion_vampire") && self.eater.health < cvar("g_balance_vore_digestion_vampire_stable")) - self.eater.health += cvar("g_balance_vore_digestion_vampire"); + Damage(self, self.predator, self.predator, cvar("g_balance_vore_digestion_damage"), DEATH_DIGESTION, self.origin, '0 0 0'); + if(cvar("g_balance_vore_digestion_vampire") && self.predator.health < cvar("g_balance_vore_digestion_vampire_stable")) + self.predator.health += cvar("g_balance_vore_digestion_vampire"); - if (self.eater.digestsound_finished < time) + if (self.predator.digestsound_finished < time) { - self.eater.digestsound_finished = time + 0.5; - PlayerSound (self.eater, playersound_digest, CHAN_PLAYER, VOICETYPE_PLAYERSOUND); + self.predator.digestsound_finished = time + 0.5; + PlayerSound (self.predator, playersound_digest, CHAN_PLAYER, VOICETYPE_PLAYERSOUND); } - self.eater.digestion_step = time; + self.predator.digestion_step = time; } if(self.health <= 0) @@ -252,15 +252,15 @@ void Vore_Teamheal() void Vore_StomachKick() { // allows prey to kick the predator's stomach and do some damage or attempt to escape - if(self.eater.classname != "player") + if(self.predator.classname != "player") return; if(time > self.stomachkick_delay) { float damage; damage = ceil(random() * (cvar("g_balance_vore_kick_damage_max") - cvar("g_balance_vore_kick_damage_min")) + cvar("g_balance_vore_kick_damage_min")); - Damage(self.eater, self, self, damage, DEATH_STOMACHKICK, self.eater.origin, '0 0 0'); - sound(self.eater, CHAN_PROJECTILE, "weapons/stomachkick.ogg", VOL_BASE, ATTN_NORM); + Damage(self.predator, self, self, damage, DEATH_STOMACHKICK, self.predator.origin, '0 0 0'); + sound(self.predator, CHAN_PROJECTILE, "weapons/stomachkick.ogg", VOL_BASE, ATTN_NORM); if(cvar("g_balance_vore_kick_escapeprobability") >= random()) Vore_Regurgitate(self); @@ -278,7 +278,7 @@ void Vore_StomachLeave() else if(time > self.complain_swallow) { play2(self, "weapons/unavailable.wav"); - sprint(self, strcat("You cannot get out of ", self.eater.netname, "\n")); + sprint(self, strcat("You cannot get out of ", self.predator.netname, "\n")); self.complain_swallow = time + complain_delay; } } @@ -298,11 +298,11 @@ void Vore_Gurglesound() void Vore() { // if we are free, show our stomach load on the HUD. Otherwise, show the predator's - if(self.eater.classname == "player") + if(self.predator.classname == "player") { - self.stat_stomachload = self.eater.stomach_load; - self.stat_digesting = self.eater.digesting; - self.stat_eaten = num_for_edict(self.eater); + self.stat_stomachload = self.predator.stomach_load; + self.stat_digesting = self.predator.digesting; + self.stat_eaten = num_for_edict(self.predator); } else { @@ -382,40 +382,40 @@ void Vore() // Code that addresses the prey: // -------------------------------- - if(self.eater.classname != "player") + if(self.predator.classname != "player") return; - if(self.eater.deadflag || self.deadflag) + if(self.predator.deadflag || self.deadflag) Vore_Regurgitate(self); - else if(self.eater.eater.classname == "player") // don't allow a player inside a player inside another player :) + else if(self.predator.predator.classname == "player") // don't allow a player inside a player inside another player :) { - entity targeteater, oldself; - targeteater = self.eater.eater; + entity target_predator, oldself; + target_predator = self.predator.predator; Vore_Regurgitate(self); if(random() < cvar("g_vore_stealprey")) if(Swallow_condition_check(self)) { oldself = self; - self = targeteater; + self = target_predator; Vore_Swallow(oldself); self = oldself; } } - else if(vlen(self.eater.velocity) > cvar("g_balance_vore_regurgitate_velocitylimit")) + else if(vlen(self.predator.velocity) > cvar("g_balance_vore_regurgitate_velocitylimit")) Vore_Regurgitate(self); // apply delayed regurgitating - if(self.eater.regurgitate_prepare && time > self.eater.regurgitate_prepare) + if(self.predator.regurgitate_prepare && time > self.predator.regurgitate_prepare) { - self.eater.regurgitate_prepare = 0; - self.eater.complain_swallow = time + complain_delay; + self.predator.regurgitate_prepare = 0; + self.predator.complain_swallow = time + complain_delay; Vore_Regurgitate(self); } - if(self.eater.digesting == TRUE) + if(self.predator.digesting == TRUE) Vore_Digest(); - if(teams_matter && self.team == self.eater.team) + if(teams_matter && self.team == self.predator.team) Vore_Teamheal(); if(self.BUTTON_ATCK) diff --git a/data/qcsrc/server/w_grabber.qc b/data/qcsrc/server/w_grabber.qc index 2a8d2c15..30937850 100644 --- a/data/qcsrc/server/w_grabber.qc +++ b/data/qcsrc/server/w_grabber.qc @@ -40,7 +40,7 @@ void spawnfunc_weapon_grabber (void) float w_grabber(float req) { - if(self.eater.classname == "player") // we can't use weapons while in the stomach + if(self.predator.classname == "player") // we can't use weapons while in the stomach { self.grabber_state |= GRABBER_REMOVING; return FALSE; -- 2.39.2