mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Blend Eye Hardcode part EX: Code the rest of the owl
This commit is contained in:
parent
70b09c647f
commit
71d301779b
9 changed files with 1682 additions and 10 deletions
|
|
@ -4732,6 +4732,7 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi
|
||||||
"S_BALLSWITCH_PAD_ACTIVE",
|
"S_BALLSWITCH_PAD_ACTIVE",
|
||||||
|
|
||||||
"S_SPIKEDTARGET",
|
"S_SPIKEDTARGET",
|
||||||
|
"S_SPIKEDLENS",
|
||||||
|
|
||||||
"S_BLENDEYE_MAIN",
|
"S_BLENDEYE_MAIN",
|
||||||
"S_BLENDEYE_MAIN_LAUNCHED",
|
"S_BLENDEYE_MAIN_LAUNCHED",
|
||||||
|
|
|
||||||
|
|
@ -5540,6 +5540,7 @@ state_t states[NUMSTATES] =
|
||||||
{SPR_SA2S, FF_FLOORSPRITE|FF_ANIMATE|FF_GLOBALANIM|1, -1, {NULL}, 1, 1, S_NULL}, // S_BALLSWITCH_PAD_ACTIVE
|
{SPR_SA2S, FF_FLOORSPRITE|FF_ANIMATE|FF_GLOBALANIM|1, -1, {NULL}, 1, 1, S_NULL}, // S_BALLSWITCH_PAD_ACTIVE
|
||||||
|
|
||||||
{SPR_STRG, FF_ADD|FF_FLOORSPRITE, -1, {NULL}, 0, 0, S_NULL}, // S_SPIKEDTARGET,
|
{SPR_STRG, FF_ADD|FF_FLOORSPRITE, -1, {NULL}, 0, 0, S_NULL}, // S_SPIKEDTARGET,
|
||||||
|
{SPR_STRG, FF_ADD, -1, {NULL}, 0, 0, S_NULL}, // S_SPIKEDLENS,
|
||||||
|
|
||||||
{SPR_BLEA, 0, -1, {NULL}, 0, 0, S_NULL}, // S_BLENDEYE_MAIN,
|
{SPR_BLEA, 0, -1, {NULL}, 0, 0, S_NULL}, // S_BLENDEYE_MAIN,
|
||||||
{SPR_BLEA, 1, -1, {NULL}, 0, 0, S_NULL}, // S_BLENDEYE_MAIN_LAUNCHED,
|
{SPR_BLEA, 1, -1, {NULL}, 0, 0, S_NULL}, // S_BLENDEYE_MAIN_LAUNCHED,
|
||||||
|
|
@ -31239,7 +31240,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
42*FRACUNIT, // radius
|
42*FRACUNIT, // radius
|
||||||
56*FRACUNIT, // height
|
56*FRACUNIT, // height
|
||||||
0, // display offset
|
0, // display offset
|
||||||
0, // mass
|
DMG_NORMAL, // mass
|
||||||
0, // damage
|
0, // damage
|
||||||
sfx_None, // activesound
|
sfx_None, // activesound
|
||||||
MF_BOSS|MF_SPECIAL|MF_NOGRAVITY|MF_NOCLIPTHING|MF_SOLID, // flags
|
MF_BOSS|MF_SPECIAL|MF_NOGRAVITY|MF_NOCLIPTHING|MF_SOLID, // flags
|
||||||
|
|
|
||||||
|
|
@ -5966,6 +5966,7 @@ typedef enum state
|
||||||
S_BALLSWITCH_PAD_ACTIVE,
|
S_BALLSWITCH_PAD_ACTIVE,
|
||||||
|
|
||||||
S_SPIKEDTARGET,
|
S_SPIKEDTARGET,
|
||||||
|
S_SPIKEDLENS,
|
||||||
|
|
||||||
S_BLENDEYE_MAIN,
|
S_BLENDEYE_MAIN,
|
||||||
S_BLENDEYE_MAIN_LAUNCHED,
|
S_BLENDEYE_MAIN_LAUNCHED,
|
||||||
|
|
|
||||||
12
src/k_boss.h
12
src/k_boss.h
|
|
@ -138,7 +138,19 @@ fixed_t *VS_RandomPointOnArena(mobj_t *arena, fixed_t radiussubtract);
|
||||||
|
|
||||||
// Blend Eye
|
// Blend Eye
|
||||||
|
|
||||||
|
void VS_BlendEye_Init(mobj_t *mobj);
|
||||||
|
void VS_BlendEye_Thinker(mobj_t *mobj);
|
||||||
|
boolean VS_BlendEye_Touched(mobj_t *special, mobj_t *toucher);
|
||||||
|
void VS_BlendEye_Damage(mobj_t *mobj, mobj_t *inflictor, mobj_t *source, INT32 damage);
|
||||||
|
void VS_BlendEye_Death(mobj_t *mobj);
|
||||||
|
|
||||||
|
boolean VS_BlendEye_Eye_Thinker(mobj_t *mobj);
|
||||||
|
void VS_BlendEye_Glass_Death(mobj_t *mobj);
|
||||||
|
void VS_BlendEye_Eggbeater_Touched(mobj_t *t1, mobj_t *t2);
|
||||||
|
void VS_BlendEye_Generator_DeadThinker(mobj_t *mobj);
|
||||||
|
|
||||||
boolean VS_PuyoTouched(mobj_t *special, mobj_t *toucher);
|
boolean VS_PuyoTouched(mobj_t *special, mobj_t *toucher);
|
||||||
|
void VS_PuyoThinker(mobj_t *mobj);
|
||||||
void VS_PuyoDeath(mobj_t *mobj);
|
void VS_PuyoDeath(mobj_t *mobj);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
||||||
|
|
@ -65,8 +65,17 @@ fixed_t *VS_PredictAroundArena(mobj_t *arena, mobj_t *movingobject, fixed_t magn
|
||||||
{
|
{
|
||||||
static fixed_t dest[2] = {0, 0};
|
static fixed_t dest[2] = {0, 0};
|
||||||
|
|
||||||
if (P_MobjWasRemoved(arena) || P_MobjWasRemoved(movingobject))
|
if (P_MobjWasRemoved(arena))
|
||||||
|
{
|
||||||
|
CONS_Alert(CONS_ERROR, "VS_PredictAroundArena: No Versus arena provided.");
|
||||||
return dest;
|
return dest;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (P_MobjWasRemoved(movingobject))
|
||||||
|
{
|
||||||
|
CONS_Alert(CONS_ERROR, "VS_PredictAroundArena: No moving object provided.");
|
||||||
|
return dest;
|
||||||
|
}
|
||||||
|
|
||||||
fixed_t radius = FixedHypot(movingobject->x - arena->x, movingobject->y - arena->y);
|
fixed_t radius = FixedHypot(movingobject->x - arena->x, movingobject->y - arena->y);
|
||||||
angle_t basedir = R_PointToAngle2(arena->x, arena->y, movingobject->x, movingobject->y);
|
angle_t basedir = R_PointToAngle2(arena->x, arena->y, movingobject->x, movingobject->y);
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -367,6 +367,12 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
/////ENEMIES & BOSSES!!/////////////////////////////////
|
/////ENEMIES & BOSSES!!/////////////////////////////////
|
||||||
////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
if (special->type == MT_BLENDEYE_MAIN)
|
||||||
|
{
|
||||||
|
if (!VS_BlendEye_Touched(special, toucher))
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
P_DamageMobj(toucher, special, special, 1, DMG_NORMAL);
|
P_DamageMobj(toucher, special, special, 1, DMG_NORMAL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -2175,6 +2181,12 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
||||||
case MT_BATTLEUFO:
|
case MT_BATTLEUFO:
|
||||||
Obj_BattleUFODeath(target);
|
Obj_BattleUFODeath(target);
|
||||||
break;
|
break;
|
||||||
|
case MT_BLENDEYE_MAIN:
|
||||||
|
VS_BlendEye_Death(target);
|
||||||
|
break;
|
||||||
|
case MT_BLENDEYE_GLASS:
|
||||||
|
VS_BlendEye_Glass_Death(target);
|
||||||
|
break;
|
||||||
case MT_BLENDEYE_PUYO:
|
case MT_BLENDEYE_PUYO:
|
||||||
VS_PuyoDeath(target);
|
VS_PuyoDeath(target);
|
||||||
break;
|
break;
|
||||||
|
|
@ -2221,7 +2233,6 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
||||||
P_InstaThrust(target, R_PointToAngle2(inflictor->x, inflictor->y, target->x, target->y)+ANGLE_90, 16<<FRACBITS);
|
P_InstaThrust(target, R_PointToAngle2(inflictor->x, inflictor->y, target->x, target->y)+ANGLE_90, 16<<FRACBITS);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Final state setting - do something instead of P_SetMobjState;
|
|
||||||
// Final state setting - do something instead of P_SetMobjState;
|
// Final state setting - do something instead of P_SetMobjState;
|
||||||
if (target->type == MT_SPIKE && target->info->deathstate != S_NULL)
|
if (target->type == MT_SPIKE && target->info->deathstate != S_NULL)
|
||||||
{
|
{
|
||||||
|
|
@ -2364,6 +2375,27 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
|
||||||
if (!sprflip)
|
if (!sprflip)
|
||||||
target->frame |= FF_VERTICALFLIP;
|
target->frame |= FF_VERTICALFLIP;
|
||||||
}
|
}
|
||||||
|
else if (target->type == MT_BLENDEYE_GENERATOR && !P_MobjWasRemoved(inflictor))
|
||||||
|
{
|
||||||
|
mobj_t *refobj = (inflictor->type == MT_INSTAWHIP) ? source : inflictor;
|
||||||
|
angle_t impactangle = R_PointToAngle2(target->x, target->y, refobj->x - refobj->momx, refobj->y - refobj->momy) - (target->angle + ANGLE_90);
|
||||||
|
|
||||||
|
if (P_MobjWasRemoved(target->tracer) == false)
|
||||||
|
{
|
||||||
|
target->tracer->flags2 &= ~MF2_FRET;
|
||||||
|
target->tracer->flags |= MF_SHOOTABLE;
|
||||||
|
P_DamageMobj(target->tracer, inflictor, source, 1, DMG_NORMAL);
|
||||||
|
target->tracer->flags &= ~MF_SHOOTABLE;
|
||||||
|
}
|
||||||
|
|
||||||
|
P_SetMobjState(
|
||||||
|
target,
|
||||||
|
((impactangle < ANGLE_180)
|
||||||
|
? target->info->deathstate
|
||||||
|
: target->info->xdeathstate
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
else if (target->player)
|
else if (target->player)
|
||||||
{
|
{
|
||||||
P_SetPlayerMobjState(target, target->info->deathstate);
|
P_SetPlayerMobjState(target, target->info->deathstate);
|
||||||
|
|
@ -3104,6 +3136,10 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
||||||
{
|
{
|
||||||
return Obj_SpecialUFODamage(target, inflictor, source, damagetype);
|
return Obj_SpecialUFODamage(target, inflictor, source, damagetype);
|
||||||
}
|
}
|
||||||
|
else if (target->type == MT_BLENDEYE_MAIN)
|
||||||
|
{
|
||||||
|
VS_BlendEye_Damage(target, inflictor, source, damage);
|
||||||
|
}
|
||||||
|
|
||||||
if (damagetype & DMG_STEAL)
|
if (damagetype & DMG_STEAL)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
22
src/p_map.c
22
src/p_map.c
|
|
@ -33,6 +33,7 @@
|
||||||
#include "i_system.h" // SRB2kart
|
#include "i_system.h" // SRB2kart
|
||||||
#include "k_terrain.h"
|
#include "k_terrain.h"
|
||||||
#include "k_objects.h"
|
#include "k_objects.h"
|
||||||
|
#include "k_boss.h"
|
||||||
|
|
||||||
#include "r_splats.h"
|
#include "r_splats.h"
|
||||||
|
|
||||||
|
|
@ -658,6 +659,11 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing)
|
||||||
return BMIT_CONTINUE; // force no collide
|
return BMIT_CONTINUE; // force no collide
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Blend-Eye internal noclip
|
||||||
|
if ((thing->type == MT_BLENDEYE_GLASS || thing->type == MT_BLENDEYE_SHIELD || thing->type == MT_BLENDEYE_EGGBEATER)
|
||||||
|
&& (tm.thing->type == MT_BLENDEYE_MAIN || tm.thing->type == MT_BLENDEYE_EYE || tm.thing->type == MT_BLENDEYE_PUYO))
|
||||||
|
return BMIT_CONTINUE;
|
||||||
|
|
||||||
// When solid spikes move, assume they just popped up and teleport things on top of them to hurt.
|
// When solid spikes move, assume they just popped up and teleport things on top of them to hurt.
|
||||||
if (tm.thing->type == MT_SPIKE && tm.thing->flags & MF_SOLID)
|
if (tm.thing->type == MT_SPIKE && tm.thing->flags & MF_SOLID)
|
||||||
{
|
{
|
||||||
|
|
@ -783,6 +789,22 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing)
|
||||||
return BMIT_CONTINUE;
|
return BMIT_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (thing->type == MT_BLENDEYE_EGGBEATER
|
||||||
|
&& tm.thing->type == MT_PLAYER && tm.thing->player)
|
||||||
|
{
|
||||||
|
if (tm.thing->z > thing->z + thing->height)
|
||||||
|
{
|
||||||
|
return BMIT_CONTINUE; // overhead
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tm.thing->z + tm.thing->height < thing->z)
|
||||||
|
{
|
||||||
|
return BMIT_CONTINUE; // underneath
|
||||||
|
}
|
||||||
|
|
||||||
|
VS_BlendEye_Eggbeater_Touched(thing, tm.thing);
|
||||||
|
}
|
||||||
|
|
||||||
if (thing->type == MT_SPB)
|
if (thing->type == MT_SPB)
|
||||||
{
|
{
|
||||||
if (tm.thing->type != MT_PLAYER
|
if (tm.thing->type != MT_PLAYER
|
||||||
|
|
|
||||||
45
src/p_mobj.c
45
src/p_mobj.c
|
|
@ -4689,7 +4689,14 @@ boolean P_SupermanLook4Players(mobj_t *actor)
|
||||||
if (!stop)
|
if (!stop)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
P_SetTarget(&actor->target, playersinthegame[P_RandomKey(PR_UNDEFINED, stop)]->mo);
|
P_SetTarget(
|
||||||
|
&actor->target,
|
||||||
|
players[
|
||||||
|
playersinthegame[
|
||||||
|
P_RandomKey(PR_MOVINGTARGET, stop)
|
||||||
|
]
|
||||||
|
].mo
|
||||||
|
);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -6857,16 +6864,19 @@ static boolean P_MobjBossThink(mobj_t *mobj)
|
||||||
}
|
}
|
||||||
else if (P_MobjWasRemoved(mobj))
|
else if (P_MobjWasRemoved(mobj))
|
||||||
return false;
|
return false;
|
||||||
else
|
else switch (mobj->type)
|
||||||
switch (mobj->type)
|
|
||||||
{
|
{
|
||||||
// No SRB2Kart bosses... yet :)
|
case MT_BLENDEYE_MAIN:
|
||||||
|
VS_BlendEye_Thinker(mobj);
|
||||||
|
break;
|
||||||
default: // Generic SOC-made boss
|
default: // Generic SOC-made boss
|
||||||
if (mobj->flags2 & MF2_SKULLFLY)
|
if (mobj->flags2 & MF2_SKULLFLY)
|
||||||
P_SpawnGhostMobj(mobj);
|
P_SpawnGhostMobj(mobj);
|
||||||
P_GenericBossThinker(mobj);
|
P_GenericBossThinker(mobj);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (P_MobjWasRemoved(mobj))
|
||||||
|
return false;
|
||||||
if (mobj->flags2 & MF2_BOSSFLEE)
|
if (mobj->flags2 & MF2_BOSSFLEE)
|
||||||
{
|
{
|
||||||
if (mobj->extravalue1)
|
if (mobj->extravalue1)
|
||||||
|
|
@ -7061,6 +7071,11 @@ static boolean P_MobjDeadThink(mobj_t *mobj)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case MT_BLENDEYE_GENERATOR:
|
||||||
|
{
|
||||||
|
VS_BlendEye_Generator_DeadThinker(mobj);
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -9976,6 +9991,24 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case MT_BLENDEYE_EYE:
|
||||||
|
{
|
||||||
|
if (!VS_BlendEye_Eye_Thinker(mobj))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case MT_BLENDEYE_PUYO:
|
||||||
|
{
|
||||||
|
VS_PuyoThinker(mobj);
|
||||||
|
if (P_MobjWasRemoved(mobj))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// check mobj against possible water content, before movement code
|
// check mobj against possible water content, before movement code
|
||||||
P_MobjCheckWater(mobj);
|
P_MobjCheckWater(mobj);
|
||||||
|
|
@ -10093,6 +10126,7 @@ static boolean P_CanFlickerFuse(mobj_t *mobj)
|
||||||
case MT_POGOSPRING:
|
case MT_POGOSPRING:
|
||||||
case MT_KART_LEFTOVER:
|
case MT_KART_LEFTOVER:
|
||||||
case MT_EMERALD:
|
case MT_EMERALD:
|
||||||
|
case MT_BLENDEYE_PUYO:
|
||||||
if (mobj->fuse <= TICRATE)
|
if (mobj->fuse <= TICRATE)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -11458,6 +11492,9 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
|
||||||
case MT_BALLSWITCH_BALL:
|
case MT_BALLSWITCH_BALL:
|
||||||
Obj_BallSwitchInit(mobj);
|
Obj_BallSwitchInit(mobj);
|
||||||
break;
|
break;
|
||||||
|
case MT_BLENDEYE_MAIN:
|
||||||
|
VS_BlendEye_Init(mobj);
|
||||||
|
break;
|
||||||
case MT_BLENDEYE_PUYO:
|
case MT_BLENDEYE_PUYO:
|
||||||
mobj->sprite = mobj->movedir = P_RandomRange(PR_DECORATION, SPR_PUYA, SPR_PUYE);
|
mobj->sprite = mobj->movedir = P_RandomRange(PR_DECORATION, SPR_PUYA, SPR_PUYE);
|
||||||
if (encoremode == false)
|
if (encoremode == false)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue