mirror of https://github.com/ZDoom/raze-gles.git
- all of player_w.cpp
This commit is contained in:
parent
be591e9cf9
commit
b891646c37
|
@ -108,27 +108,26 @@ void DoFire(struct player_struct *p, short snum)
|
|||
|
||||
void DoSpawn(struct player_struct *p, short snum)
|
||||
{
|
||||
int j;
|
||||
if(!aplWeaponSpawn[p->curr_weapon][snum])
|
||||
return;
|
||||
|
||||
j = fi.spawn(p->i, aplWeaponSpawn[p->curr_weapon][snum]);
|
||||
auto j = spawn(p->GetActor(), aplWeaponSpawn[p->curr_weapon][snum]);
|
||||
|
||||
if((aplWeaponFlags[p->curr_weapon][snum] & WEAPON_FLAG_SPAWNTYPE2 ) )
|
||||
{
|
||||
// like shotgun shells
|
||||
sprite[j].ang += 1024;
|
||||
j->s.ang += 1024;
|
||||
ssp(j,CLIPMASK0);
|
||||
sprite[j].ang += 1024;
|
||||
j->s.ang += 1024;
|
||||
// p->kickback_pic++;
|
||||
}
|
||||
else if((aplWeaponFlags[p->curr_weapon][snum] & WEAPON_FLAG_SPAWNTYPE3 ) )
|
||||
{
|
||||
// like chaingun shells
|
||||
sprite[j].ang += 1024;
|
||||
sprite[j].ang &= 2047;
|
||||
sprite[j].xvel += 32;
|
||||
sprite[j].z += (3<<8);
|
||||
j->s.ang += 1024;
|
||||
j->s.ang &= 2047;
|
||||
j->s.xvel += 32;
|
||||
j->s.z += (3<<8);
|
||||
ssp(j,CLIPMASK0);
|
||||
}
|
||||
|
||||
|
@ -311,7 +310,7 @@ void operateweapon_ww(int snum, ESyncBits actions, int psect)
|
|||
{
|
||||
auto p = &ps[snum];
|
||||
int pi = p->i;
|
||||
int i, j, k;
|
||||
int i, k;
|
||||
int psectlotag = sector[psect].lotag;
|
||||
|
||||
// already firing...
|
||||
|
@ -342,33 +341,33 @@ void operateweapon_ww(int snum, ESyncBits actions, int psect)
|
|||
i = -512 - mulscale16(p->horizon.sum().asq16(), 20);
|
||||
}
|
||||
|
||||
j = EGS(p->cursectnum,
|
||||
auto j = EGS(p->cursectnum,
|
||||
p->posx + (sintable[(p->angle.ang.asbuild() + 512) & 2047] >> 6),
|
||||
p->posy + (sintable[p->angle.ang.asbuild() & 2047] >> 6),
|
||||
p->posz, HEAVYHBOMB, -16, 9, 9,
|
||||
p->angle.ang.asbuild(), (k + (p->hbomb_hold_delay << 5)), i, pi, 1);
|
||||
p->angle.ang.asbuild(), (k + (p->hbomb_hold_delay << 5)), i, p->GetActor(), 1);
|
||||
|
||||
{
|
||||
int lGrenadeLifetime = GetGameVar("GRENADE_LIFETIME", NAM_GRENADE_LIFETIME, nullptr, snum);
|
||||
int lGrenadeLifetimeVar = GetGameVar("GRENADE_LIFETIME_VAR", NAM_GRENADE_LIFETIME_VAR, nullptr, snum);
|
||||
// set timer. blows up when at zero....
|
||||
sprite[j].extra = lGrenadeLifetime
|
||||
j->s.extra = lGrenadeLifetime
|
||||
+ mulscale(krand(), lGrenadeLifetimeVar, 14)
|
||||
- lGrenadeLifetimeVar;
|
||||
}
|
||||
|
||||
if (k == 15)
|
||||
{
|
||||
sprite[j].yvel = 3;
|
||||
sprite[j].z += (8 << 8);
|
||||
j->s.yvel = 3;
|
||||
j->s.z += (8 << 8);
|
||||
}
|
||||
|
||||
k = hits(p->GetActor());
|
||||
if (k < 512)
|
||||
{
|
||||
sprite[j].ang += 1024;
|
||||
sprite[j].zvel /= 3;
|
||||
sprite[j].xvel /= 3;
|
||||
j->s.ang += 1024;
|
||||
j->s.zvel /= 3;
|
||||
j->s.xvel /= 3;
|
||||
}
|
||||
|
||||
p->hbomb_on = 1;
|
||||
|
|
Loading…
Reference in New Issue