SERVER: Prohibit fall damage while teleporting

This commit is contained in:
cypress 2023-11-24 09:32:52 -05:00
parent f9479abb3d
commit dc67f93a6b
2 changed files with 10 additions and 6 deletions

View file

@ -358,7 +358,7 @@ void() perk_pap =
//
// Model
if (!self.model) {
if (!self.model || self.model == "models/machines/hl_scale/pap.mdl") {
self.model = "models/machines/quake_scale/pap.mdl";
}

View file

@ -142,6 +142,9 @@ void(entity who) teleport_entity =
setorigin(who, who.origin + '0 0 40');
}
// Prohibit taking fall damage
who.oldz = who.origin_z;
switch(self.iszomb) {
case 0:
who.origin += '20 0 0';
@ -166,12 +169,13 @@ void(entity who) teleport_entity =
who.weapon2model = "";
who.movetype = MOVETYPE_WALK;
if (who.flags & FL_ONGROUND) {
who.flags = who.flags - FL_ONGROUND;
who.velocity = v_forward * 0;
}
// if (who.flags & FL_ONGROUND) {
// who.flags = who.flags - FL_ONGROUND;
// who.velocity = v_forward * 0;
// }
who.flags = who.flags - who.flags & FL_ONGROUND;
who.flags = who.flags & FL_ONGROUND;
who.velocity = '0 0 0';
}
void() teleport_entities =