mirror of
https://github.com/nzp-team/quakec.git
synced 2025-01-31 13:40:52 +00:00
SERVER: Prohibit fall damage while teleporting
This commit is contained in:
parent
f9479abb3d
commit
dc67f93a6b
2 changed files with 10 additions and 6 deletions
|
@ -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";
|
||||
}
|
||||
|
||||
|
|
|
@ -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 =
|
||||
|
|
Loading…
Reference in a new issue