mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-20 18:42:26 +00:00
- some smaller changes in various places.
This commit is contained in:
parent
bc584f6ff6
commit
a583a9cb14
7 changed files with 28 additions and 36 deletions
|
@ -521,7 +521,6 @@ int SetupCoolg(DSWActor* actor)
|
|||
SPRITEp sp = &actor->s();
|
||||
USERp u;
|
||||
ANIMATOR DoActorDecide;
|
||||
int SpriteNum = actor->GetSpriteIndex();
|
||||
|
||||
if (!TEST(sp->cstat, CSTAT_SPRITE_RESTORE))
|
||||
{
|
||||
|
|
|
@ -628,7 +628,6 @@ int DoCoolieMove(DSWActor* actor)
|
|||
|
||||
if (Distance(sp->x, sp->y, u->targetActor->s().x, u->targetActor->s().y) < 1200)
|
||||
{
|
||||
//DoActorDie(SpriteNum, -3);
|
||||
UpdateSinglePlayKills(actor);
|
||||
DoActorDie(actor, actor, 0);
|
||||
return 0;
|
||||
|
|
|
@ -40,8 +40,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
|||
|
||||
BEGIN_SW_NS
|
||||
|
||||
//int InitActorMoveCloser(short SpriteNum);
|
||||
|
||||
DECISION GirlNinjaBattle[] =
|
||||
{
|
||||
{499, InitActorMoveCloser},
|
||||
|
|
|
@ -177,9 +177,6 @@ JS_SpriteSetup(void)
|
|||
if (tag == MIRROR_CAM && sp->picnum != ST1)
|
||||
{
|
||||
// Just change it to static, sprite has all the info I need
|
||||
// u = SpawnUser(SpriteNum, sp->picnum, nullptr);
|
||||
// RESET(sp->cstat, CSTAT_SPRITE_BLOCK);
|
||||
// SET(sp->cstat, CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||
change_actor_stat(actor, STAT_SPAWN_SPOT);
|
||||
}
|
||||
|
||||
|
@ -279,7 +276,6 @@ void JS_InitMirrors(void)
|
|||
{
|
||||
short startwall, endwall;
|
||||
int i, j, s;
|
||||
int SpriteNum;
|
||||
bool Found_Cam = false;
|
||||
|
||||
|
||||
|
@ -333,14 +329,14 @@ void JS_InitMirrors(void)
|
|||
|
||||
Found_Cam = false;
|
||||
|
||||
StatIterator it(STAT_ST1);
|
||||
while ((ii = it.NextIndex()) >= 0)
|
||||
SWStatIterator it(STAT_ST1);
|
||||
while (auto itActor = it.Next())
|
||||
{
|
||||
sp = &sprite[ii];
|
||||
sp = &itActor->s();
|
||||
// if correct type and matches
|
||||
if (sp->hitag == MIRROR_CAM && sp->lotag == wall[i].hitag)
|
||||
{
|
||||
mirror[mirrorcnt].camera = ii;
|
||||
mirror[mirrorcnt].camera = itActor->GetSpriteIndex();
|
||||
// Set up camera variables
|
||||
SP_TAG5(sp) = sp->ang; // Set current angle to
|
||||
// sprite angle
|
||||
|
@ -349,14 +345,14 @@ void JS_InitMirrors(void)
|
|||
}
|
||||
|
||||
it.Reset(STAT_SPAWN_SPOT);
|
||||
while ((ii = it.NextIndex()) >= 0)
|
||||
while (auto itActor = it.Next())
|
||||
{
|
||||
sp = &sprite[ii];
|
||||
sp = &itActor->s();
|
||||
|
||||
// if correct type and matches
|
||||
if (sp->hitag == MIRROR_CAM && sp->lotag == wall[i].hitag)
|
||||
{
|
||||
mirror[mirrorcnt].camera = ii;
|
||||
mirror[mirrorcnt].camera = itActor->GetSpriteIndex();
|
||||
// Set up camera variables
|
||||
SP_TAG5(sp) = sp->ang; // Set current angle to
|
||||
// sprite angle
|
||||
|
@ -376,15 +372,15 @@ void JS_InitMirrors(void)
|
|||
Found_Cam = false;
|
||||
if (TEST_BOOL1(&sprite[mirror[mirrorcnt].camera]))
|
||||
{
|
||||
StatIterator it(STAT_DEFAULT);
|
||||
while ((SpriteNum = it.NextIndex()) >= 0)
|
||||
SWStatIterator it(STAT_DEFAULT);
|
||||
while (auto itActor = it.Next())
|
||||
{
|
||||
sp = &sprite[SpriteNum];
|
||||
sp = &itActor->s();
|
||||
if (sp->picnum >= CAMSPRITE && sp->picnum < CAMSPRITE + 8 &&
|
||||
sp->hitag == wall[i].hitag)
|
||||
{
|
||||
mirror[mirrorcnt].campic = sp->picnum;
|
||||
mirror[mirrorcnt].camsprite = SpriteNum;
|
||||
mirror[mirrorcnt].camsprite = itActor->GetSpriteIndex();
|
||||
|
||||
// JBF: commenting out this line results in the screen in $BULLET being visible
|
||||
tileDelete(mirror[mirrorcnt].campic);
|
||||
|
|
|
@ -1897,7 +1897,6 @@ int InitPhosphorus(DSWActor* actor)
|
|||
// SET(wp->cstat, CSTAT_SPRITE_TRANSLUCENT|CSTAT_SPRITE_YCENTER);
|
||||
wp->shade = -128;
|
||||
|
||||
//SetOwner(SpriteNum, w);
|
||||
wp->yrepeat = 64;
|
||||
wp->xrepeat = 64;
|
||||
wp->shade = -15;
|
||||
|
|
|
@ -2559,6 +2559,7 @@ void DoPlayerMoveVehicle(PLAYERp pp)
|
|||
short save_sectnum;
|
||||
auto actor = pp->sop->sp_child;
|
||||
SPRITEp sp = &actor->s();
|
||||
auto psp = &pp->Actor()->s();
|
||||
USERp u = actor->u();
|
||||
int save_cstat;
|
||||
int x[4], y[4], ox[4], oy[4];
|
||||
|
@ -2662,13 +2663,13 @@ void DoPlayerMoveVehicle(PLAYERp pp)
|
|||
int vel;
|
||||
int ret;
|
||||
|
||||
save_cstat = pp->SpriteP->cstat;
|
||||
RESET(pp->SpriteP->cstat, CSTAT_SPRITE_BLOCK);
|
||||
save_cstat = psp->cstat;
|
||||
RESET(psp->cstat, CSTAT_SPRITE_BLOCK);
|
||||
DoPlayerTurnVehicleRect(pp, x, y, ox, oy);
|
||||
|
||||
ret = RectClipMove(pp, x, y);
|
||||
DriveCrush(pp, x, y);
|
||||
pp->SpriteP->cstat = save_cstat;
|
||||
psp->cstat = save_cstat;
|
||||
|
||||
if (!ret)
|
||||
{
|
||||
|
@ -2718,8 +2719,8 @@ void DoPlayerMoveVehicle(PLAYERp pp)
|
|||
DoPlayerTurnVehicle(pp, pp->input.avel, z, floor_dist);
|
||||
}
|
||||
|
||||
save_cstat = pp->SpriteP->cstat;
|
||||
RESET(pp->SpriteP->cstat, CSTAT_SPRITE_BLOCK);
|
||||
save_cstat = psp->cstat;
|
||||
RESET(psp->cstat, CSTAT_SPRITE_BLOCK);
|
||||
if (pp->sop->clipdist)
|
||||
{
|
||||
vec3_t clippos = { pp->posx, pp->posy, z };
|
||||
|
@ -2730,7 +2731,7 @@ void DoPlayerMoveVehicle(PLAYERp pp)
|
|||
{
|
||||
SetCollision(u, MultiClipMove(pp, z, floor_dist));
|
||||
}
|
||||
pp->SpriteP->cstat = save_cstat;
|
||||
psp->cstat = save_cstat;
|
||||
|
||||
//SetupDriveCrush(pp, x, y);
|
||||
//DriveCrush(pp, x, y);
|
||||
|
@ -7370,21 +7371,21 @@ DEFINE_FIELD_X(SWPlayer, PLAYERstruct, WpnReloadState)
|
|||
DEFINE_ACTION_FUNCTION(_SWPlayer, WeaponNum)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(PLAYERstruct);
|
||||
USERp uu = User[self->PlayerSprite].Data();
|
||||
USERp uu = self->Actor()->u();
|
||||
ACTION_RETURN_INT(uu->WeaponNum);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_SWPlayer, Health)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(PLAYERstruct);
|
||||
USERp uu = User[self->PlayerSprite].Data();
|
||||
USERp uu = self->Actor()->u();
|
||||
ACTION_RETURN_INT(uu->Health);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_SWPlayer, MaxUserHealth)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(PLAYERstruct);
|
||||
USERp uu = User[self->PlayerSprite].Data();
|
||||
USERp uu = self->Actor()->u();
|
||||
ACTION_RETURN_INT(uu->MaxHealth);
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ InitPrediction(PLAYERp pp)
|
|||
|
||||
// make a copy of player struct and sprite
|
||||
*ppp = *pp;
|
||||
PredictUser = *User[pp->PlayerSprite];
|
||||
PredictUser = *pp->Actor()->u();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -90,11 +90,11 @@ DoPrediction(PLAYERp ppp)
|
|||
|
||||
// back up things so they won't get stepped on
|
||||
bakrandomseed = randomseed;
|
||||
spr = sprite[Player[myconnectindex].PlayerSprite];
|
||||
sprite[Player[myconnectindex].PlayerSprite].cstat = 0;
|
||||
spr = s prite[Player[myconnectindex].P_layerSprite];
|
||||
s prite[Player[myconnectindex].P_layerSprite].cstat = 0;
|
||||
|
||||
u = User[ppp->PlayerSprite];
|
||||
User[ppp->PlayerSprite] = &PredictUser;
|
||||
u = U ser[ppp->P_layerSprite];
|
||||
U ser[ppp->P_layerSprite] = &PredictUser;
|
||||
|
||||
ppp->oposx = ppp->posx;
|
||||
ppp->oposy = ppp->posy;
|
||||
|
@ -110,8 +110,8 @@ DoPrediction(PLAYERp ppp)
|
|||
Prediction = false;
|
||||
|
||||
// restore things
|
||||
User[ppp->PlayerSprite] = u;
|
||||
sprite[Player[myconnectindex].PlayerSprite] = spr;
|
||||
U ser[ppp->P_layerSprite] = u;
|
||||
s prite[Player[myconnectindex].P_layerSprite] = spr;
|
||||
randomseed = bakrandomseed;
|
||||
|
||||
Predict[predictmovefifoplc & (MOVEFIFOSIZ-1)].x = ppp->posx;
|
||||
|
|
Loading…
Reference in a new issue