mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-29 13:00:43 +00:00
- player.i, part 1
This commit is contained in:
parent
d5a74e4290
commit
770897b8b9
7 changed files with 16 additions and 16 deletions
|
@ -539,14 +539,14 @@ void operatejaildoors(int hitag)
|
|||
jaildooropen[i] = 1;
|
||||
jaildoordrag[i] = jaildoordist[i];
|
||||
if (!isRRRA() || jaildoorsound[i] != 0)
|
||||
S_PlayActorSound(jaildoorsound[i], ps[screenpeek].i);
|
||||
S_PlayActorSound(jaildoorsound[i], ps[screenpeek].GetActor());
|
||||
}
|
||||
if (jaildooropen[i] == 2)
|
||||
{
|
||||
jaildooropen[i] = 3;
|
||||
jaildoordrag[i] = jaildoordist[i];
|
||||
if (!isRRRA() || jaildoorsound[i] != 0)
|
||||
S_PlayActorSound(jaildoorsound[i], ps[screenpeek].i);
|
||||
S_PlayActorSound(jaildoorsound[i], ps[screenpeek].GetActor());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -197,13 +197,13 @@ void addweapon_r(struct player_struct* p, int weapon)
|
|||
case THROWINGDYNAMITE_WEAPON:
|
||||
break;
|
||||
case SHOTGUN_WEAPON:
|
||||
S_PlayActorSound(SHOTGUN_COCK, p->i);
|
||||
S_PlayActorSound(SHOTGUN_COCK, p->GetActor());
|
||||
break;
|
||||
case PISTOL_WEAPON:
|
||||
S_PlayActorSound(INSERT_CLIP, p->i);
|
||||
S_PlayActorSound(INSERT_CLIP, p->GetActor());
|
||||
break;
|
||||
default:
|
||||
S_PlayActorSound(EJECT_CLIP, p->i);
|
||||
S_PlayActorSound(EJECT_CLIP, p->GetActor());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1956,7 +1956,7 @@ int ParseState::parse(void)
|
|||
{
|
||||
if ((j - *insptr) < (max_player_health >> 2) &&
|
||||
j >= (max_player_health >> 2))
|
||||
S_PlayActorSound(DUKE_GOTHEALTHATLOW, ps[g_p].i);
|
||||
S_PlayActorSound(DUKE_GOTHEALTHATLOW, ps[g_p].GetActor());
|
||||
|
||||
ps[g_p].last_extra = j;
|
||||
}
|
||||
|
@ -2032,7 +2032,7 @@ int ParseState::parse(void)
|
|||
{
|
||||
if ((j - *insptr) < (max_player_health >> 2) &&
|
||||
j >= (max_player_health >> 2))
|
||||
S_PlayActorSound(229, ps[g_p].i);
|
||||
S_PlayActorSound(229, ps[g_p].GetActor());
|
||||
|
||||
ps[g_p].last_extra = j;
|
||||
}
|
||||
|
@ -2097,7 +2097,7 @@ int ParseState::parse(void)
|
|||
{
|
||||
if( ( j - *insptr ) < (max_player_health>>2) &&
|
||||
j >= (max_player_health>>2) )
|
||||
S_PlayActorSound(isRR()? 229 : DUKE_GOTHEALTHATLOW,ps[g_p].i);
|
||||
S_PlayActorSound(isRR()? 229 : DUKE_GOTHEALTHATLOW,ps[g_p].GetActor());
|
||||
|
||||
ps[g_p].last_extra = j;
|
||||
}
|
||||
|
@ -2230,7 +2230,7 @@ int ParseState::parse(void)
|
|||
g_sp->y = g_ac->bposy = ps[g_p].bobposy = ps[g_p].oposy = ps[g_p].posy;
|
||||
g_sp->z = g_ac->bposy = ps[g_p].oposz = ps[g_p].posz;
|
||||
updatesector(ps[g_p].posx, ps[g_p].posy, &ps[g_p].cursectnum);
|
||||
setsprite(ps[g_p].i, ps[g_p].posx, ps[g_p].posy, ps[g_p].posz + PHEIGHT);
|
||||
setsprite(ps[g_p].GetActor(), ps[g_p].posx, ps[g_p].posy, ps[g_p].posz + PHEIGHT);
|
||||
g_sp->cstat = 257;
|
||||
|
||||
g_sp->shade = -12;
|
||||
|
|
|
@ -77,7 +77,7 @@ inline int checkcursectnums(int se)
|
|||
{
|
||||
int i;
|
||||
for(i=connecthead;i>=0;i=connectpoint2[i])
|
||||
if((unsigned)ps[i].i < MAXSPRITES && ps[i].GetActor()->s.sectnum == se ) return i;
|
||||
if(ps[i].GetActor() && ps[i].GetActor()->s.sectnum == se ) return i;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -950,7 +950,7 @@ void enterlevel(MapRecord *mi, int gamemode)
|
|||
|
||||
for (int i = connecthead; i >= 0; i = connectpoint2[i])
|
||||
{
|
||||
int pn = sector[sprite[ps[i].i].sectnum].floorpicnum;
|
||||
int pn = sector[ps[i].GetActor()->s.sectnum].floorpicnum;
|
||||
if (pn == TILE_HURTRAIL || pn == TILE_FLOORSLIME || pn == TILE_FLOORPLASMA)
|
||||
{
|
||||
resetweapons(i);
|
||||
|
|
|
@ -279,11 +279,12 @@ void animatecamsprite(double smoothratio)
|
|||
int spriteNum = camsprite;
|
||||
|
||||
auto p = &ps[screenpeek];
|
||||
auto sp = &sprite[spriteNum];
|
||||
auto act = &hittype[spriteNum];
|
||||
auto sp = &act->s;
|
||||
|
||||
if (p->newowner >= 0) sp->owner = p->newowner;
|
||||
|
||||
if (sp->owner >= 0 && dist(&sprite[p->i], sp) < VIEWSCREEN_ACTIVE_DISTANCE)
|
||||
if (sp->owner >= 0 && dist(p->GetActor(), act) < VIEWSCREEN_ACTIVE_DISTANCE)
|
||||
{
|
||||
auto tex = tileGetTexture(sp->picnum);
|
||||
TileFiles.MakeCanvas(TILE_VIEWSCR, tex->GetDisplayWidth(), tex->GetDisplayHeight());
|
||||
|
@ -621,8 +622,8 @@ void displayrooms(int snum, double smoothratio)
|
|||
// do screen rotation.
|
||||
renderSetRollAngle(rotscrnang.asbam() / (double)(BAMUNIT));
|
||||
|
||||
cz = hittype[p->i].ceilingz;
|
||||
fz = hittype[p->i].floorz;
|
||||
cz = p->GetActor()->ceilingz;
|
||||
fz = p->GetActor()->floorz;
|
||||
|
||||
if (earthquaketime > 0 && p->on_ground == 1)
|
||||
{
|
||||
|
|
|
@ -444,7 +444,6 @@ int S_PlaySound3D(int sndnum, int spriteNum, const vec3_t* pos, int channel, ECh
|
|||
if (ud.multimode == 1)
|
||||
{
|
||||
spriteNum = pl->i;
|
||||
auto sp = &sprite[spriteNum];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue