mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'thing-radius-acs' into 'master'
"Radius Action" thing type See merge request KartKrew/Kart!1429
This commit is contained in:
commit
656e9ad310
4 changed files with 74 additions and 0 deletions
|
|
@ -5809,6 +5809,8 @@ const char *const MOBJTYPE_LIST[] = { // array length left dynamic for sanity t
|
|||
"MT_BATTLEUFO_BEAM",
|
||||
|
||||
"MT_POWERUP_AURA",
|
||||
|
||||
"MT_SCRIPT_THING",
|
||||
};
|
||||
|
||||
const char *const MOBJFLAG_LIST[] = {
|
||||
|
|
|
|||
27
src/info.c
27
src/info.c
|
|
@ -30312,6 +30312,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
MF_NOBLOCKMAP|MF_NOGRAVITY|MF_NOCLIPHEIGHT|MF_SCENERY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_SCRIPT_THING
|
||||
4096, // doomednum
|
||||
S_INVISIBLE, // spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
0, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
16*FRACUNIT, // radius
|
||||
16*FRACUNIT, // height
|
||||
0, // display offset
|
||||
0, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOBLOCKMAP|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOCLIPTHING|MF_NOGRAVITY|MF_SCENERY, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
};
|
||||
|
||||
skincolor_t skincolors[MAXSKINCOLORS] = {
|
||||
|
|
|
|||
|
|
@ -6999,6 +6999,8 @@ typedef enum mobj_type
|
|||
|
||||
MT_POWERUP_AURA,
|
||||
|
||||
MT_SCRIPT_THING,
|
||||
|
||||
MT_FIRSTFREESLOT,
|
||||
MT_LASTFREESLOT = MT_FIRSTFREESLOT + NUMMOBJFREESLOTS - 1,
|
||||
NUMMOBJTYPES
|
||||
|
|
|
|||
43
src/p_mobj.c
43
src/p_mobj.c
|
|
@ -6725,6 +6725,49 @@ static void P_MobjSceneryThink(mobj_t *mobj)
|
|||
case MT_ARKARROW:
|
||||
Obj_ArkArrowThink(mobj);
|
||||
break;
|
||||
case MT_SCRIPT_THING:
|
||||
{
|
||||
if (mobj->thing_args[2] != 0)
|
||||
{
|
||||
// turned off
|
||||
break;
|
||||
}
|
||||
|
||||
UINT8 i;
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (playeringame[i] == false)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
player_t *player = &players[i];
|
||||
if (P_MobjWasRemoved(player->mo) == true)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
fixed_t dist = R_PointToDist2(
|
||||
mobj->x, mobj->y,
|
||||
player->mo->x, player->mo->y
|
||||
);
|
||||
|
||||
if (dist < mobj->thing_args[0] * FRACUNIT)
|
||||
{
|
||||
P_ActivateThingSpecial(mobj, player->mo);
|
||||
|
||||
if (mobj->thing_args[1] == 0)
|
||||
{
|
||||
P_RemoveMobj(mobj);
|
||||
return;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case MT_VWREF:
|
||||
case MT_VWREB:
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue