mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-18 23:21:43 +00:00
- starting at the bottom of player_r.cpp.
This commit is contained in:
parent
33f730baf3
commit
2c573a720b
3 changed files with 19 additions and 21 deletions
|
@ -210,7 +210,7 @@ void cacheit_r();
|
||||||
void FTA(int q, struct player_struct* p);
|
void FTA(int q, struct player_struct* p);
|
||||||
void OnMotorcycle(player_struct *pl, int snum);
|
void OnMotorcycle(player_struct *pl, int snum);
|
||||||
void OffMotorcycle(player_struct *pl);
|
void OffMotorcycle(player_struct *pl);
|
||||||
void OnBoat(player_struct *pl, int snum);
|
void OnBoat(player_struct *pl, DDukeActor* snum);
|
||||||
void OffBoat(player_struct *pl);
|
void OffBoat(player_struct *pl);
|
||||||
|
|
||||||
void cameratext(int i);
|
void cameratext(int i);
|
||||||
|
|
|
@ -4218,7 +4218,6 @@ void OnMotorcycle(struct player_struct *p, int motosprite)
|
||||||
|
|
||||||
void OffMotorcycle(struct player_struct *p)
|
void OffMotorcycle(struct player_struct *p)
|
||||||
{
|
{
|
||||||
short j;
|
|
||||||
if (p->OnMotorcycle)
|
if (p->OnMotorcycle)
|
||||||
{
|
{
|
||||||
if (S_CheckActorSoundPlaying(p->i,188))
|
if (S_CheckActorSoundPlaying(p->i,188))
|
||||||
|
@ -4248,11 +4247,11 @@ void OffMotorcycle(struct player_struct *p)
|
||||||
p->posxv -= sintable[(p->angle.ang.asbuild()+512)&2047]<<7;
|
p->posxv -= sintable[(p->angle.ang.asbuild()+512)&2047]<<7;
|
||||||
p->posyv -= sintable[p->angle.ang.asbuild()&2047]<<7;
|
p->posyv -= sintable[p->angle.ang.asbuild()&2047]<<7;
|
||||||
p->moto_underwater = 0;
|
p->moto_underwater = 0;
|
||||||
j = fi.spawn(p->i, EMPTYBIKE);
|
auto spawned = spawn(p->GetActor(), EMPTYBIKE);
|
||||||
sprite[j].ang = p->angle.ang.asbuild();
|
spawned->s.ang = p->angle.ang.asbuild();
|
||||||
sprite[j].xvel += sintable[(p->angle.ang.asbuild()+512)&2047]<<7;
|
spawned->s.xvel += sintable[(p->angle.ang.asbuild()+512)&2047]<<7;
|
||||||
sprite[j].yvel += sintable[p->angle.ang.asbuild()&2047]<<7;
|
spawned->s.yvel += sintable[p->angle.ang.asbuild()&2047]<<7;
|
||||||
sprite[j].owner = p->ammo_amount[MOTORCYCLE_WEAPON];
|
spawned->s.owner = p->ammo_amount[MOTORCYCLE_WEAPON];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4262,17 +4261,17 @@ void OffMotorcycle(struct player_struct *p)
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
void OnBoat(struct player_struct *p, int boatsprite)
|
void OnBoat(struct player_struct *p, DDukeActor* boat)
|
||||||
{
|
{
|
||||||
if (!p->OnBoat)
|
if (!p->OnBoat)
|
||||||
{
|
{
|
||||||
if (boatsprite)
|
if (boat)
|
||||||
{
|
{
|
||||||
p->posx = sprite[boatsprite].x;
|
p->posx = boat->s.x;
|
||||||
p->posy = sprite[boatsprite].y;
|
p->posy = boat->s.y;
|
||||||
p->angle.ang = buildang(sprite[boatsprite].ang);
|
p->angle.ang = buildang(boat->s.ang);
|
||||||
p->ammo_amount[BOAT_WEAPON] = sprite[boatsprite].owner;
|
p->ammo_amount[BOAT_WEAPON] = boat->s.owner;
|
||||||
deletesprite(boatsprite);
|
deletesprite(boat);
|
||||||
}
|
}
|
||||||
p->over_shoulder_on = 0;
|
p->over_shoulder_on = 0;
|
||||||
p->OnBoat = 1;
|
p->OnBoat = 1;
|
||||||
|
@ -4293,7 +4292,6 @@ void OnBoat(struct player_struct *p, int boatsprite)
|
||||||
|
|
||||||
void OffBoat(struct player_struct *p)
|
void OffBoat(struct player_struct *p)
|
||||||
{
|
{
|
||||||
short j;
|
|
||||||
if (p->OnBoat)
|
if (p->OnBoat)
|
||||||
{
|
{
|
||||||
p->OnBoat = 0;
|
p->OnBoat = 0;
|
||||||
|
@ -4313,11 +4311,11 @@ void OffBoat(struct player_struct *p)
|
||||||
p->posxv -= sintable[(p->angle.ang.asbuild()+512)&2047]<<7;
|
p->posxv -= sintable[(p->angle.ang.asbuild()+512)&2047]<<7;
|
||||||
p->posyv -= sintable[p->angle.ang.asbuild()&2047]<<7;
|
p->posyv -= sintable[p->angle.ang.asbuild()&2047]<<7;
|
||||||
p->moto_underwater = 0;
|
p->moto_underwater = 0;
|
||||||
j = fi.spawn(p->i, EMPTYBOAT);
|
auto spawned = spawn(p->GetActor(), EMPTYBOAT);
|
||||||
sprite[j].ang = p->angle.ang.asbuild();
|
spawned->s.ang = p->angle.ang.asbuild();
|
||||||
sprite[j].xvel += sintable[(p->angle.ang.asbuild()+512)&2047]<<7;
|
spawned->s.xvel += sintable[(p->angle.ang.asbuild()+512)&2047]<<7;
|
||||||
sprite[j].yvel += sintable[p->angle.ang.asbuild()&2047]<<7;
|
spawned->s.yvel += sintable[p->angle.ang.asbuild()&2047]<<7;
|
||||||
sprite[j].owner = p->ammo_amount[BOAT_WEAPON];
|
spawned->s.owner = p->ammo_amount[BOAT_WEAPON];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2628,7 +2628,7 @@ void checksectors_r(int snum)
|
||||||
return;
|
return;
|
||||||
case EMPTYBOAT:
|
case EMPTYBOAT:
|
||||||
if (!isRRRA()) return;
|
if (!isRRRA()) return;
|
||||||
OnBoat(p, neartagsprite);
|
OnBoat(p, &hittype[neartagsprite]);
|
||||||
return;
|
return;
|
||||||
case RRTILE8164:
|
case RRTILE8164:
|
||||||
case RRTILE8165:
|
case RRTILE8165:
|
||||||
|
|
Loading…
Reference in a new issue