diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 0e7730d9c..b6b563dc2 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,8 @@ September 27, 2009 (Changes by Graf Zahl) +- Fixed: Floor and ceiling huggers' velocity was wrong when used with + P_SpawnPlayerMissile. +- Fixed: When hitting a voodoo doll the real player needs to be checked for + invulnerability. - Fixed: G_QueueBody was not notifying the translation that it was changed. - Fixed: The multitexture composition code was missing a NULL pointer check. - fixed: The changes for new colormap handling in FMultipatchtexture were incomplete. diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index b508d8f55..a062281f9 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -1088,6 +1088,7 @@ void P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage // if (player) { + //Added by MC: Lets bots look allround for enemies if they survive an ambush. if (player->isbot) { @@ -1103,8 +1104,9 @@ void P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage if (!(flags & DMG_FORCED)) { - if (damage < TELEFRAG_DAMAGE && ((target->flags2 & MF2_INVULNERABLE) || - (target->player->cheats & CF_GODMODE))) + // check the real player, not a voodoo doll here for invulnerability effects + if (damage < TELEFRAG_DAMAGE && ((player->mo->flags2 & MF2_INVULNERABLE) || + (player->cheats & CF_GODMODE))) { // player is invulnerable, so don't hurt him return; } diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 8449924ef..7d2f4c58d 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -5177,16 +5177,16 @@ AActor *P_SpawnPlayerMissile (AActor *source, fixed_t x, fixed_t y, fixed_t z, vz = -finesine[pitch>>ANGLETOFINESHIFT]; speed = MissileActor->Speed; - MissileActor->velx = FixedMul (vx, speed); - MissileActor->vely = FixedMul (vy, speed); + FVector3 vec(vx, vy, vz); + if (MissileActor->flags3 & (MF3_FLOORHUGGER|MF3_CEILINGHUGGER)) { - MissileActor->velz = 0; - } - else - { - MissileActor->velz = FixedMul (vz, speed); + vec.Z = 0; } + vec.Resize(speed); + MissileActor->velx = (fixed_t)vec.X; + MissileActor->vely = (fixed_t)vec.Y; + MissileActor->velz = (fixed_t)vec.Z; if (MissileActor->flags4 & MF4_SPECTRAL) MissileActor->health = -1;