mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-27 07:51:36 +00:00
Merge branch 'fix-bufo-fof' into 'master'
Fix Battle UFO tractor descending through FOFs Closes #876 See merge request KartKrew/Kart!1807
This commit is contained in:
commit
3084b5ee18
5 changed files with 19 additions and 12 deletions
|
|
@ -791,6 +791,7 @@ consvar_t cv_votetime = UnsavedNetVar("votetime", "20").min_max(10, 3600);
|
|||
consvar_t cv_barriertime = OnlineCheat("barriertime", "30").values(CV_Natural).description("How long it takes for the Barrier to shrink in Battle Overtime");
|
||||
consvar_t cv_battlespawn = OnlineCheat("battlespawn", "0").values(CV_Unsigned).description("Spawn every player at the same spawnpoint in Battle (0 = random spawns)");
|
||||
consvar_t cv_battletest = OnlineCheat("battletest", "Off").on_off().description("Free Play goes to Battle instead of Prisons");
|
||||
consvar_t cv_battleufotest = OnlineCheat("battleufotest", "Off").on_off().description("Respawn Battle UFOs instantly after being destroyed");
|
||||
|
||||
#ifdef DEVELOP
|
||||
consvar_t cv_botcontrol = OnlineCheat("botcontrol", "On").on_off().description("Toggle bot AI movement");
|
||||
|
|
|
|||
|
|
@ -31079,7 +31079,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
0, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOGRAVITY|MF_NOCLIP|MF_DONTENCOREMAP, // flags
|
||||
MF_SCENERY|MF_NOGRAVITY|MF_NOCLIP|MF_DONTENCOREMAP, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#include "../mobj.hpp"
|
||||
#include "../mobj_list.hpp"
|
||||
|
||||
#include "../command.h"
|
||||
#include "../doomdef.h"
|
||||
#include "../m_random.h"
|
||||
#include "../p_local.h"
|
||||
|
|
@ -17,6 +18,8 @@ using srb2::math::Fixed;
|
|||
using srb2::Mobj;
|
||||
using srb2::MobjList;
|
||||
|
||||
extern consvar_t cv_battleufotest;
|
||||
|
||||
extern mobj_t* svg_battleUfoSpawners;
|
||||
|
||||
#define BATTLEUFO_LEG_ZOFFS (3*FRACUNIT) // Spawn height offset from the body
|
||||
|
|
@ -169,7 +172,7 @@ void Obj_BattleUFODeath(mobj_t *mobj, mobj_t *inflictor)
|
|||
if (ufo->spawner())
|
||||
{
|
||||
g_battleufo.previousId = ufo->spawner()->id();
|
||||
g_battleufo.due = leveltime + BATTLE_UFO_TIME;
|
||||
g_battleufo.due = leveltime + (cv_battleufotest.value ? 1 : BATTLE_UFO_TIME);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -244,9 +247,4 @@ INT32 Obj_RandomBattleUFOSpawnerID(void)
|
|||
void Obj_BattleUFOBeamThink(mobj_t *beam)
|
||||
{
|
||||
P_SetObjectMomZ(beam, beam->info->speed, true);
|
||||
|
||||
if (P_IsObjectOnGround(beam))
|
||||
{
|
||||
P_RemoveMobj(beam);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -785,6 +785,11 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing)
|
|||
return BMIT_CONTINUE; // overhead
|
||||
}
|
||||
|
||||
if (tm.thing->z + tm.thing->height < thing->floorz)
|
||||
{
|
||||
return BMIT_CONTINUE; // underneath
|
||||
}
|
||||
|
||||
if (!tm.thing->player || !tm.thing->player->fastfall)
|
||||
{
|
||||
fixed_t tractorHeight = 211*mapobjectscale;
|
||||
|
|
|
|||
13
src/p_mobj.c
13
src/p_mobj.c
|
|
@ -3184,6 +3184,14 @@ boolean P_SceneryZMovement(mobj_t *mo)
|
|||
return false;
|
||||
}
|
||||
break;
|
||||
case MT_BATTLEUFO_BEAM:
|
||||
Obj_BattleUFOBeamThink(mo);
|
||||
if (mo->momz <= 0 && mo->z + mo->momz <= mo->floorz)
|
||||
{
|
||||
P_RemoveMobj(mo);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -9032,11 +9040,6 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
|
|||
Obj_BattleUFOLegThink(mobj);
|
||||
break;
|
||||
}
|
||||
case MT_BATTLEUFO_BEAM:
|
||||
{
|
||||
Obj_BattleUFOBeamThink(mobj);
|
||||
break;
|
||||
}
|
||||
case MT_ROCKETSNEAKER:
|
||||
if (!mobj->target || !mobj->target->health)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue