mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- shoot interface transitioned/operateweapon mostly done.
This commit is contained in:
parent
513744aa56
commit
32a7c2349e
11 changed files with 165 additions and 167 deletions
|
@ -1721,7 +1721,7 @@ void recon(DDukeActor *actor, int explosion, int firelaser, int attacksnd, int p
|
||||||
a = s->ang;
|
a = s->ang;
|
||||||
s->ang = actor->tempang;
|
s->ang = actor->tempang;
|
||||||
if (attacksnd >= 0) S_PlayActorSound(attacksnd, actor);
|
if (attacksnd >= 0) S_PlayActorSound(attacksnd, actor);
|
||||||
fi.shoot(actor->GetIndex(), firelaser);
|
fi.shoot(actor, firelaser);
|
||||||
s->ang = a;
|
s->ang = a;
|
||||||
}
|
}
|
||||||
if (t[2] > (26 * 3) || !cansee(s->x, s->y, s->z - (16 << 8), s->sectnum, ps[p].posx, ps[p].posy, ps[p].posz, ps[p].cursectnum))
|
if (t[2] > (26 * 3) || !cansee(s->x, s->y, s->z - (16 << 8), s->sectnum, ps[p].posx, ps[p].posy, ps[p].posz, ps[p].cursectnum))
|
||||||
|
@ -1755,7 +1755,7 @@ void recon(DDukeActor *actor, int explosion, int firelaser, int attacksnd, int p
|
||||||
else if ((t[2] & 15) == 0 && attacksnd >= 0)
|
else if ((t[2] & 15) == 0 && attacksnd >= 0)
|
||||||
{
|
{
|
||||||
S_PlayActorSound(attacksnd, actor);
|
S_PlayActorSound(attacksnd, actor);
|
||||||
fi.shoot(actor->GetIndex(), firelaser);
|
fi.shoot(actor, firelaser);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
s->ang += getincangle(s->ang, getangle(ps[p].posx - s->x, ps[p].posy - s->y)) >> 2;
|
s->ang += getincangle(s->ang, getangle(ps[p].posx - s->x, ps[p].posy - s->y)) >> 2;
|
||||||
|
@ -2885,7 +2885,7 @@ void handle_se14(DDukeActor* actor, bool checkstat, int RPG, int JIBS6)
|
||||||
{
|
{
|
||||||
j = s->ang;
|
j = s->ang;
|
||||||
s->ang = getangle(s->x - ps[p].posx, s->y - ps[p].posy);
|
s->ang = getangle(s->x - ps[p].posx, s->y - ps[p].posy);
|
||||||
fi.shoot(actor->GetIndex(), RPG);
|
fi.shoot(actor, RPG);
|
||||||
s->ang = j;
|
s->ang = j;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3437,7 +3437,7 @@ void handle_se05(DDukeActor* actor, int FIRELASER)
|
||||||
{
|
{
|
||||||
j = s->ang;
|
j = s->ang;
|
||||||
s->ang = getangle(s->x - ps[p].posx, s->y - ps[p].posy);
|
s->ang = getangle(s->x - ps[p].posx, s->y - ps[p].posy);
|
||||||
fi.shoot(actor->GetIndex(), FIRELASER);
|
fi.shoot(actor, FIRELASER);
|
||||||
s->ang = j;
|
s->ang = j;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3775,7 +3775,7 @@ void moveeffectors_d(void) //STATNUM 3
|
||||||
if (act->temp_data[0])
|
if (act->temp_data[0])
|
||||||
{
|
{
|
||||||
if (act->temp_data[0] == 1)
|
if (act->temp_data[0] == 1)
|
||||||
fi.shoot(act->GetIndex(), sc->extra);
|
fi.shoot(act, sc->extra);
|
||||||
else if (act->temp_data[0] == 26 * 5)
|
else if (act->temp_data[0] == 26 * 5)
|
||||||
act->temp_data[0] = 0;
|
act->temp_data[0] = 0;
|
||||||
act->temp_data[0]++;
|
act->temp_data[0]++;
|
||||||
|
|
|
@ -3656,7 +3656,7 @@ void moveeffectors_r(void) //STATNUM 3
|
||||||
if (t[0])
|
if (t[0])
|
||||||
{
|
{
|
||||||
if (t[0] == 1)
|
if (t[0] == 1)
|
||||||
fi.shoot(act->GetIndex(), sc->extra);
|
fi.shoot(act, sc->extra);
|
||||||
else if (t[0] == 26 * 5)
|
else if (t[0] == 26 * 5)
|
||||||
t[0] = 0;
|
t[0] = 0;
|
||||||
t[0]++;
|
t[0]++;
|
||||||
|
|
|
@ -90,8 +90,8 @@ int spawn_d(int j, int pn);
|
||||||
int spawn_r(int j, int pn);
|
int spawn_r(int j, int pn);
|
||||||
void incur_damage_d(struct player_struct* p);
|
void incur_damage_d(struct player_struct* p);
|
||||||
void incur_damage_r(struct player_struct* p);
|
void incur_damage_r(struct player_struct* p);
|
||||||
void shoot_d(int i, int atwith);
|
void shoot_d(DDukeActor* i, int atwith);
|
||||||
void shoot_r(int i, int atwith);
|
void shoot_r(DDukeActor* i, int atwith);
|
||||||
void selectweapon_d(int snum, int j);
|
void selectweapon_d(int snum, int j);
|
||||||
void selectweapon_r(int snum, int j);
|
void selectweapon_r(int snum, int j);
|
||||||
int doincrements_d(struct player_struct* p);
|
int doincrements_d(struct player_struct* p);
|
||||||
|
|
|
@ -104,7 +104,7 @@ struct Dispatcher
|
||||||
|
|
||||||
// player
|
// player
|
||||||
void (*incur_damage)(struct player_struct* p);
|
void (*incur_damage)(struct player_struct* p);
|
||||||
void (*shoot)(int, int);
|
void (*shoot)(DDukeActor*, int);
|
||||||
void (*selectweapon)(int snum, int j);
|
void (*selectweapon)(int snum, int j);
|
||||||
int (*doincrements)(struct player_struct* p);
|
int (*doincrements)(struct player_struct* p);
|
||||||
void (*checkweapons)(struct player_struct* p);
|
void (*checkweapons)(struct player_struct* p);
|
||||||
|
|
|
@ -1758,7 +1758,7 @@ int ParseState::parse(void)
|
||||||
break;
|
break;
|
||||||
case concmd_shoot:
|
case concmd_shoot:
|
||||||
insptr++;
|
insptr++;
|
||||||
fi.shoot(g_ac->GetIndex(), (short)*insptr);
|
fi.shoot(g_ac, (short)*insptr);
|
||||||
insptr++;
|
insptr++;
|
||||||
break;
|
break;
|
||||||
case concmd_ifsoundid:
|
case concmd_ifsoundid:
|
||||||
|
|
|
@ -993,9 +993,8 @@ static void shootgrowspark(DDukeActor* actor, int p, int sx, int sy, int sz, int
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
void shoot_d(int i_, int atwith)
|
void shoot_d(DDukeActor* actor, int atwith)
|
||||||
{
|
{
|
||||||
auto actor = &hittype[i_];
|
|
||||||
spritetype* const s = &actor->s;
|
spritetype* const s = &actor->s;
|
||||||
|
|
||||||
short sect, l, j;
|
short sect, l, j;
|
||||||
|
@ -1128,7 +1127,7 @@ void shoot_d(int i_, int atwith)
|
||||||
EGS(sect,
|
EGS(sect,
|
||||||
sx + (sintable[(512 + sa + 512) & 2047] >> 8),
|
sx + (sintable[(512 + sa + 512) & 2047] >> 8),
|
||||||
sy + (sintable[(sa + 512) & 2047] >> 8),
|
sy + (sintable[(sa + 512) & 2047] >> 8),
|
||||||
sz + (6 << 8), atwith, -64, 32, 32, sa, vel, zvel, i, 1);
|
sz + (6 << 8), atwith, -64, 32, 32, sa, vel, zvel, actor, 1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GROWSPARK:
|
case GROWSPARK:
|
||||||
|
@ -1136,10 +1135,11 @@ void shoot_d(int i_, int atwith)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SHRINKER:
|
case SHRINKER:
|
||||||
|
{
|
||||||
if (s->extra >= 0) s->shade = -96;
|
if (s->extra >= 0) s->shade = -96;
|
||||||
if (p >= 0)
|
if (p >= 0)
|
||||||
{
|
{
|
||||||
auto aimed = isNamWW2GI()? nullptr : aim(actor, AUTO_AIM_ANGLE);
|
auto aimed = isNamWW2GI() ? nullptr : aim(actor, AUTO_AIM_ANGLE);
|
||||||
if (aimed)
|
if (aimed)
|
||||||
{
|
{
|
||||||
dal = ((aimed->s.xrepeat * tilesiz[aimed->s.picnum].y) << 1);
|
dal = ((aimed->s.xrepeat * tilesiz[aimed->s.picnum].y) << 1);
|
||||||
|
@ -1156,17 +1156,18 @@ void shoot_d(int i_, int atwith)
|
||||||
}
|
}
|
||||||
else zvel = 0;
|
else zvel = 0;
|
||||||
|
|
||||||
j = EGS(sect,
|
auto j = EGS(sect,
|
||||||
sx + (sintable[(512 + sa + 512) & 2047] >> 12),
|
sx + (sintable[(512 + sa + 512) & 2047] >> 12),
|
||||||
sy + (sintable[(sa + 512) & 2047] >> 12),
|
sy + (sintable[(sa + 512) & 2047] >> 12),
|
||||||
sz + (2 << 8), SHRINKSPARK, -16, 28, 28, sa, 768, zvel, i, 4);
|
sz + (2 << 8), SHRINKSPARK, -16, 28, 28, sa, 768, zvel, actor, 4);
|
||||||
|
|
||||||
sprite[j].cstat = 128;
|
j->s.cstat = 128;
|
||||||
sprite[j].clipdist = 32;
|
j->s.clipdist = 32;
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1502,7 +1503,7 @@ int doincrements_d(struct player_struct* p)
|
||||||
p->last_quick_kick = p->quick_kick + 1;
|
p->last_quick_kick = p->quick_kick + 1;
|
||||||
p->quick_kick--;
|
p->quick_kick--;
|
||||||
if (p->quick_kick == 8)
|
if (p->quick_kick == 8)
|
||||||
fi.shoot(p->i, KNEE);
|
fi.shoot(p->GetActor(), KNEE);
|
||||||
}
|
}
|
||||||
else if (p->last_quick_kick > 0)
|
else if (p->last_quick_kick > 0)
|
||||||
p->last_quick_kick--;
|
p->last_quick_kick--;
|
||||||
|
@ -2158,8 +2159,8 @@ static void fireweapon(int snum)
|
||||||
static void operateweapon(int snum, ESyncBits actions, int psect)
|
static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
{
|
{
|
||||||
auto p = &ps[snum];
|
auto p = &ps[snum];
|
||||||
int pi = p->i;
|
auto pact = p->GetActor();
|
||||||
int i, j, k;
|
int i, k;
|
||||||
|
|
||||||
// already firing...
|
// already firing...
|
||||||
|
|
||||||
|
@ -2187,29 +2188,29 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
i = -512 - mulscale16(p->horizon.sum().asq16(), 20);
|
i = -512 - mulscale16(p->horizon.sum().asq16(), 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
j = EGS(p->cursectnum,
|
auto spawned = EGS(p->cursectnum,
|
||||||
p->posx + (sintable[(p->angle.ang.asbuild() + 512) & 2047] >> 6),
|
p->posx + (sintable[(p->angle.ang.asbuild() + 512) & 2047] >> 6),
|
||||||
p->posy + (sintable[p->angle.ang.asbuild() & 2047] >> 6),
|
p->posy + (sintable[p->angle.ang.asbuild() & 2047] >> 6),
|
||||||
p->posz, HEAVYHBOMB, -16, 9, 9,
|
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, pact, 1);
|
||||||
|
|
||||||
if (isNam())
|
if (isNam())
|
||||||
{
|
{
|
||||||
sprite[j].extra = mulscale(krand(), NAM_GRENADE_LIFETIME_VAR, 14);
|
spawned->s.extra = mulscale(krand(), NAM_GRENADE_LIFETIME_VAR, 14);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (k == 15)
|
if (k == 15)
|
||||||
{
|
{
|
||||||
sprite[j].yvel = 3;
|
spawned->s.yvel = 3;
|
||||||
sprite[j].z += (8 << 8);
|
spawned->s.z += (8 << 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
k = hits(p->GetActor());
|
k = hits(pact);
|
||||||
if (k < 512)
|
if (k < 512)
|
||||||
{
|
{
|
||||||
sprite[j].ang += 1024;
|
spawned->s.ang += 1024;
|
||||||
sprite[j].zvel /= 3;
|
spawned->s.zvel /= 3;
|
||||||
sprite[j].xvel /= 3;
|
spawned->s.xvel /= 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
p->hbomb_on = 1;
|
p->hbomb_on = 1;
|
||||||
|
@ -2257,14 +2258,14 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
case PISTOL_WEAPON: // m-16 in NAM
|
case PISTOL_WEAPON: // m-16 in NAM
|
||||||
if (p->kickback_pic == 1)
|
if (p->kickback_pic == 1)
|
||||||
{
|
{
|
||||||
fi.shoot(pi, SHOTSPARK1);
|
fi.shoot(pact, SHOTSPARK1);
|
||||||
S_PlayActorSound(PISTOL_FIRE, pi);
|
S_PlayActorSound(PISTOL_FIRE, pact);
|
||||||
lastvisinc = ud.levelclock + 32;
|
lastvisinc = ud.levelclock + 32;
|
||||||
p->visibility = 0;
|
p->visibility = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (p->kickback_pic == 2)
|
else if (p->kickback_pic == 2)
|
||||||
fi.spawn(pi, SHELL);
|
spawn(pact, SHELL);
|
||||||
|
|
||||||
p->kickback_pic++;
|
p->kickback_pic++;
|
||||||
|
|
||||||
|
@ -2280,14 +2281,14 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
switch (p->kickback_pic)
|
switch (p->kickback_pic)
|
||||||
{
|
{
|
||||||
case 5:
|
case 5:
|
||||||
S_PlayActorSound(EJECT_CLIP, pi);
|
S_PlayActorSound(EJECT_CLIP, pact);
|
||||||
break;
|
break;
|
||||||
//#ifdef NAM
|
//#ifdef NAM
|
||||||
// case WEAPON2_RELOAD_TIME - 15:
|
// case WEAPON2_RELOAD_TIME - 15:
|
||||||
//#else
|
//#else
|
||||||
case 8:
|
case 8:
|
||||||
//#endif
|
//#endif
|
||||||
S_PlayActorSound(INSERT_CLIP, pi);
|
S_PlayActorSound(INSERT_CLIP, pact);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2307,16 +2308,11 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
|
|
||||||
if (p->kickback_pic == 4)
|
if (p->kickback_pic == 4)
|
||||||
{
|
{
|
||||||
fi.shoot(pi, SHOTGUN);
|
for(int i = 0; i < 7; i++)
|
||||||
fi.shoot(pi, SHOTGUN);
|
fi.shoot(pact, SHOTGUN);
|
||||||
fi.shoot(pi, SHOTGUN);
|
|
||||||
fi.shoot(pi, SHOTGUN);
|
|
||||||
fi.shoot(pi, SHOTGUN);
|
|
||||||
fi.shoot(pi, SHOTGUN);
|
|
||||||
fi.shoot(pi, SHOTGUN);
|
|
||||||
p->ammo_amount[SHOTGUN_WEAPON]--;
|
p->ammo_amount[SHOTGUN_WEAPON]--;
|
||||||
|
|
||||||
S_PlayActorSound(SHOTGUN_FIRE, pi);
|
S_PlayActorSound(SHOTGUN_FIRE, pact);
|
||||||
|
|
||||||
lastvisinc = ud.levelclock + 32;
|
lastvisinc = ud.levelclock + 32;
|
||||||
p->visibility = 0;
|
p->visibility = 0;
|
||||||
|
@ -2329,19 +2325,21 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
checkavailweapon(p);
|
checkavailweapon(p);
|
||||||
break;
|
break;
|
||||||
case 15:
|
case 15:
|
||||||
S_PlayActorSound(SHOTGUN_COCK, pi);
|
S_PlayActorSound(SHOTGUN_COCK, pact);
|
||||||
break;
|
break;
|
||||||
case 17:
|
case 17:
|
||||||
case 20:
|
case 20:
|
||||||
p->kickback_pic++;
|
p->kickback_pic++;
|
||||||
break;
|
break;
|
||||||
case 24:
|
case 24:
|
||||||
j = fi.spawn(pi, SHOTGUNSHELL);
|
{
|
||||||
sprite[j].ang += 1024;
|
auto j = spawn(pact, SHOTGUNSHELL);
|
||||||
|
j->s.ang += 1024;
|
||||||
ssp(j, CLIPMASK0);
|
ssp(j, CLIPMASK0);
|
||||||
sprite[j].ang += 1024;
|
j->s.ang += 1024;
|
||||||
p->kickback_pic++;
|
p->kickback_pic++;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case 31:
|
case 31:
|
||||||
p->okickback_pic = p->kickback_pic = 0;
|
p->okickback_pic = p->kickback_pic = 0;
|
||||||
return;
|
return;
|
||||||
|
@ -2360,17 +2358,17 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
|
|
||||||
if ((p->kickback_pic % 3) == 0)
|
if ((p->kickback_pic % 3) == 0)
|
||||||
{
|
{
|
||||||
j = fi.spawn(pi, SHELL);
|
auto j = spawn(pact, SHELL);
|
||||||
|
|
||||||
sprite[j].ang += 1024;
|
j->s.ang += 1024;
|
||||||
sprite[j].ang &= 2047;
|
j->s.ang &= 2047;
|
||||||
sprite[j].xvel += 32;
|
j->s.xvel += 32;
|
||||||
sprite[j].z += (3 << 8);
|
j->s.z += (3 << 8);
|
||||||
ssp(j, CLIPMASK0);
|
ssp(j, CLIPMASK0);
|
||||||
}
|
}
|
||||||
|
|
||||||
S_PlayActorSound(CHAINGUN_FIRE, pi);
|
S_PlayActorSound(CHAINGUN_FIRE, pact);
|
||||||
fi.shoot(pi, CHAINGUN);
|
fi.shoot(pact, CHAINGUN);
|
||||||
lastvisinc = ud.levelclock + 32;
|
lastvisinc = ud.levelclock + 32;
|
||||||
p->visibility = 0;
|
p->visibility = 0;
|
||||||
checkavailweapon(p);
|
checkavailweapon(p);
|
||||||
|
@ -2414,7 +2412,7 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
else
|
else
|
||||||
p->okickback_pic = p->kickback_pic = 0;
|
p->okickback_pic = p->kickback_pic = 0;
|
||||||
p->ammo_amount[p->curr_weapon]--;
|
p->ammo_amount[p->curr_weapon]--;
|
||||||
fi.shoot(pi, GROWSPARK);
|
fi.shoot(pact, GROWSPARK);
|
||||||
|
|
||||||
//#ifdef NAM
|
//#ifdef NAM
|
||||||
//#else
|
//#else
|
||||||
|
@ -2449,7 +2447,7 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
else p->okickback_pic = p->kickback_pic = 0;
|
else p->okickback_pic = p->kickback_pic = 0;
|
||||||
|
|
||||||
p->ammo_amount[SHRINKER_WEAPON]--;
|
p->ammo_amount[SHRINKER_WEAPON]--;
|
||||||
fi.shoot(pi, SHRINKER);
|
fi.shoot(pact, SHRINKER);
|
||||||
|
|
||||||
if (!isNam())
|
if (!isNam())
|
||||||
{
|
{
|
||||||
|
@ -2482,7 +2480,7 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
{
|
{
|
||||||
p->visibility = 0;
|
p->visibility = 0;
|
||||||
lastvisinc = ud.levelclock + 32;
|
lastvisinc = ud.levelclock + 32;
|
||||||
fi.shoot(pi, RPG);
|
fi.shoot(pact, RPG);
|
||||||
p->ammo_amount[DEVISTATOR_WEAPON]--;
|
p->ammo_amount[DEVISTATOR_WEAPON]--;
|
||||||
checkavailweapon(p);
|
checkavailweapon(p);
|
||||||
}
|
}
|
||||||
|
@ -2492,7 +2490,7 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
{
|
{
|
||||||
p->visibility = 0;
|
p->visibility = 0;
|
||||||
lastvisinc = ud.levelclock + 32;
|
lastvisinc = ud.levelclock + 32;
|
||||||
fi.shoot(pi, RPG);
|
fi.shoot(pact, RPG);
|
||||||
p->ammo_amount[DEVISTATOR_WEAPON]--;
|
p->ammo_amount[DEVISTATOR_WEAPON]--;
|
||||||
checkavailweapon(p);
|
checkavailweapon(p);
|
||||||
if (p->ammo_amount[DEVISTATOR_WEAPON] <= 0) p->okickback_pic = p->kickback_pic = 0;
|
if (p->ammo_amount[DEVISTATOR_WEAPON] <= 0) p->okickback_pic = p->kickback_pic = 0;
|
||||||
|
@ -2512,10 +2510,10 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
|
|
||||||
p->visibility = 0;
|
p->visibility = 0;
|
||||||
lastvisinc = ud.levelclock + 32;
|
lastvisinc = ud.levelclock + 32;
|
||||||
fi.shoot(pi, FREEZEBLAST);
|
fi.shoot(pact, FREEZEBLAST);
|
||||||
checkavailweapon(p);
|
checkavailweapon(p);
|
||||||
}
|
}
|
||||||
if (p->GetActor()->s.xrepeat < 32)
|
if (pact->s.xrepeat < 32)
|
||||||
{
|
{
|
||||||
p->okickback_pic = p->kickback_pic = 0; break;
|
p->okickback_pic = p->kickback_pic = 0; break;
|
||||||
}
|
}
|
||||||
|
@ -2525,7 +2523,7 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
if (actions & SB_FIRE)
|
if (actions & SB_FIRE)
|
||||||
{
|
{
|
||||||
p->okickback_pic = p->kickback_pic = 1;
|
p->okickback_pic = p->kickback_pic = 1;
|
||||||
S_PlayActorSound(CAT_FIRE, pi);
|
S_PlayActorSound(CAT_FIRE, pact);
|
||||||
}
|
}
|
||||||
else p->okickback_pic = p->kickback_pic = 0;
|
else p->okickback_pic = p->kickback_pic = 0;
|
||||||
}
|
}
|
||||||
|
@ -2542,7 +2540,7 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
p->ammo_amount[FLAMETHROWER_WEAPON]--;
|
p->ammo_amount[FLAMETHROWER_WEAPON]--;
|
||||||
if (snum == screenpeek)
|
if (snum == screenpeek)
|
||||||
g_visibility = 0;
|
g_visibility = 0;
|
||||||
fi.shoot(pi, FIREBALL);
|
fi.shoot(pact, FIREBALL);
|
||||||
}
|
}
|
||||||
checkavailweapon(p);
|
checkavailweapon(p);
|
||||||
}
|
}
|
||||||
|
@ -2551,7 +2549,7 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
if ((actions & SB_FIRE) != 0)
|
if ((actions & SB_FIRE) != 0)
|
||||||
{
|
{
|
||||||
p->okickback_pic = p->kickback_pic = 1;
|
p->okickback_pic = p->kickback_pic = 1;
|
||||||
S_PlayActorSound(FLAMETHROWER_INTRO, pi);
|
S_PlayActorSound(FLAMETHROWER_INTRO, pact);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
p->okickback_pic = p->kickback_pic = 0;
|
p->okickback_pic = p->kickback_pic = 0;
|
||||||
|
@ -2564,7 +2562,7 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
p->posz = p->oposz;
|
p->posz = p->oposz;
|
||||||
p->poszv = 0;
|
p->poszv = 0;
|
||||||
if (p->kickback_pic == 3)
|
if (p->kickback_pic == 3)
|
||||||
fi.shoot(pi, HANDHOLDINGLASER);
|
fi.shoot(pact, HANDHOLDINGLASER);
|
||||||
}
|
}
|
||||||
if (p->kickback_pic == 16)
|
if (p->kickback_pic == 16)
|
||||||
{
|
{
|
||||||
|
@ -2577,7 +2575,7 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
case KNEE_WEAPON:
|
case KNEE_WEAPON:
|
||||||
p->kickback_pic++;
|
p->kickback_pic++;
|
||||||
|
|
||||||
if (p->kickback_pic == 7) fi.shoot(pi, KNEE);
|
if (p->kickback_pic == 7) fi.shoot(pact, KNEE);
|
||||||
else if (p->kickback_pic == 14)
|
else if (p->kickback_pic == 14)
|
||||||
{
|
{
|
||||||
if (actions & SB_FIRE)
|
if (actions & SB_FIRE)
|
||||||
|
@ -2596,7 +2594,7 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
p->ammo_amount[RPG_WEAPON]--;
|
p->ammo_amount[RPG_WEAPON]--;
|
||||||
lastvisinc = ud.levelclock + 32;
|
lastvisinc = ud.levelclock + 32;
|
||||||
p->visibility = 0;
|
p->visibility = 0;
|
||||||
fi.shoot(pi, RPG);
|
fi.shoot(pact, RPG);
|
||||||
checkavailweapon(p);
|
checkavailweapon(p);
|
||||||
}
|
}
|
||||||
else if (p->kickback_pic == (cl_dukefixrpgrecoil ? 13 : 20))
|
else if (p->kickback_pic == (cl_dukefixrpgrecoil ? 13 : 20))
|
||||||
|
|
|
@ -835,13 +835,13 @@ static void shootwhip(int i, int p, int sx, int sy, int sz, int sa, int atwith)
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
void shoot_r(int i, int atwith)
|
void shoot_r(DDukeActor* actor, int atwith)
|
||||||
{
|
{
|
||||||
|
spritetype* const s = &actor->s;
|
||||||
|
|
||||||
short sect, sa, p, j;
|
short sect, sa, p, j;
|
||||||
int sx, sy, sz, vel, zvel, x;
|
int sx, sy, sz, vel, zvel, x;
|
||||||
|
|
||||||
auto actor = &hittype[i];
|
|
||||||
spritetype* const s = &actor->s;
|
|
||||||
|
|
||||||
sect = s->sectnum;
|
sect = s->sectnum;
|
||||||
zvel = 0;
|
zvel = 0;
|
||||||
|
@ -880,6 +880,7 @@ void shoot_r(int i, int atwith)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int i = actor->GetIndex();
|
||||||
switch (atwith)
|
switch (atwith)
|
||||||
{
|
{
|
||||||
case BLOODSPLAT1:
|
case BLOODSPLAT1:
|
||||||
|
@ -903,19 +904,21 @@ void shoot_r(int i, int atwith)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case TRIPBOMBSPRITE:
|
case TRIPBOMBSPRITE:
|
||||||
j = fi.spawn(i, atwith);
|
{
|
||||||
sprite[j].xvel = 32;
|
auto j = spawn(actor, atwith);
|
||||||
sprite[j].ang = sprite[i].ang;
|
j->s.xvel = 32;
|
||||||
sprite[j].z -= (5 << 8);
|
j->s.ang = s->ang;
|
||||||
|
j->s.z -= (5 << 8);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case BOWLINGBALL:
|
case BOWLINGBALL:
|
||||||
j = fi.spawn(i, atwith);
|
{
|
||||||
sprite[j].xvel = 250;
|
auto j = spawn(actor, atwith);
|
||||||
sprite[j].ang = sprite[i].ang;
|
j->s.xvel = 250;
|
||||||
sprite[j].z -= (15 << 8);
|
j->s.ang = s->ang;
|
||||||
|
j->s.z -= (15 << 8);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case OWHIP:
|
case OWHIP:
|
||||||
case UWHIP:
|
case UWHIP:
|
||||||
shootwhip(i, p, sx, sy, sz, sa, atwith);
|
shootwhip(i, p, sx, sy, sz, sa, atwith);
|
||||||
|
@ -2817,8 +2820,8 @@ static void fireweapon(int snum)
|
||||||
static void operateweapon(int snum, ESyncBits actions, int psect)
|
static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
{
|
{
|
||||||
auto p = &ps[snum];
|
auto p = &ps[snum];
|
||||||
int pi = p->i;
|
auto pact = p->GetActor();
|
||||||
int i, j, k;
|
int i, k;
|
||||||
int psectlotag = sector[psect].lotag;
|
int psectlotag = sector[psect].lotag;
|
||||||
|
|
||||||
if (!isRRRA() && p->curr_weapon >= MOTORCYCLE_WEAPON) return;
|
if (!isRRRA() && p->curr_weapon >= MOTORCYCLE_WEAPON) return;
|
||||||
|
@ -2876,24 +2879,24 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
i = -512 - -mulscale16(p->horizon.sum().asq16(), 20);
|
i = -512 - -mulscale16(p->horizon.sum().asq16(), 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
j = EGS(p->cursectnum,
|
auto spawned = EGS(p->cursectnum,
|
||||||
p->posx + (sintable[(p->angle.ang.asbuild() + 512) & 2047] >> 6),
|
p->posx + (sintable[(p->angle.ang.asbuild() + 512) & 2047] >> 6),
|
||||||
p->posy + (sintable[p->angle.ang.asbuild() & 2047] >> 6),
|
p->posy + (sintable[p->angle.ang.asbuild() & 2047] >> 6),
|
||||||
p->posz, HEAVYHBOMB, -16, 9, 9,
|
p->posz, HEAVYHBOMB, -16, 9, 9,
|
||||||
p->angle.ang.asbuild(), (k + (p->hbomb_hold_delay << 5)) * 2, i, pi, 1);
|
p->angle.ang.asbuild(), (k + (p->hbomb_hold_delay << 5)) * 2, i, pact, 1);
|
||||||
|
|
||||||
if (k == 15)
|
if (k == 15)
|
||||||
{
|
{
|
||||||
sprite[j].yvel = 3;
|
spawned->s.yvel = 3;
|
||||||
sprite[j].z += (8 << 8);
|
spawned->s.z += (8 << 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
k = hits(p->GetActor());
|
k = hits(p->GetActor());
|
||||||
if (k < 512)
|
if (k < 512)
|
||||||
{
|
{
|
||||||
sprite[j].ang += 1024;
|
spawned->s.ang += 1024;
|
||||||
sprite[j].zvel /= 3;
|
spawned->s.zvel /= 3;
|
||||||
sprite[j].xvel /= 3;
|
spawned->s.xvel /= 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
p->hbomb_on = 1;
|
p->hbomb_on = 1;
|
||||||
|
@ -2920,8 +2923,8 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
case PISTOL_WEAPON:
|
case PISTOL_WEAPON:
|
||||||
if (p->kickback_pic == 1)
|
if (p->kickback_pic == 1)
|
||||||
{
|
{
|
||||||
fi.shoot(pi, SHOTSPARK1);
|
fi.shoot(pact, SHOTSPARK1);
|
||||||
S_PlayActorSound(PISTOL_FIRE, pi);
|
S_PlayActorSound(PISTOL_FIRE, pact);
|
||||||
p->noise_radius = 8192;
|
p->noise_radius = 8192;
|
||||||
madenoise(snum);
|
madenoise(snum);
|
||||||
|
|
||||||
|
@ -2955,10 +2958,10 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
switch (p->kickback_pic)
|
switch (p->kickback_pic)
|
||||||
{
|
{
|
||||||
case 24:
|
case 24:
|
||||||
S_PlayActorSound(EJECT_CLIP, pi);
|
S_PlayActorSound(EJECT_CLIP, pact);
|
||||||
break;
|
break;
|
||||||
case 30:
|
case 30:
|
||||||
S_PlayActorSound(INSERT_CLIP, pi);
|
S_PlayActorSound(INSERT_CLIP, pact);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2986,20 +2989,20 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
|
|
||||||
if (p->kickback_pic == 4)
|
if (p->kickback_pic == 4)
|
||||||
{
|
{
|
||||||
fi.shoot(pi, SHOTGUN);
|
fi.shoot(pact, SHOTGUN);
|
||||||
fi.shoot(pi, SHOTGUN);
|
fi.shoot(pact, SHOTGUN);
|
||||||
fi.shoot(pi, SHOTGUN);
|
fi.shoot(pact, SHOTGUN);
|
||||||
fi.shoot(pi, SHOTGUN);
|
fi.shoot(pact, SHOTGUN);
|
||||||
fi.shoot(pi, SHOTGUN);
|
fi.shoot(pact, SHOTGUN);
|
||||||
fi.shoot(pi, SHOTGUN);
|
fi.shoot(pact, SHOTGUN);
|
||||||
fi.shoot(pi, SHOTGUN);
|
fi.shoot(pact, SHOTGUN);
|
||||||
fi.shoot(pi, SHOTGUN);
|
fi.shoot(pact, SHOTGUN);
|
||||||
fi.shoot(pi, SHOTGUN);
|
fi.shoot(pact, SHOTGUN);
|
||||||
fi.shoot(pi, SHOTGUN);
|
fi.shoot(pact, SHOTGUN);
|
||||||
|
|
||||||
p->ammo_amount[SHOTGUN_WEAPON]--;
|
p->ammo_amount[SHOTGUN_WEAPON]--;
|
||||||
|
|
||||||
S_PlayActorSound(SHOTGUN_FIRE, pi);
|
S_PlayActorSound(SHOTGUN_FIRE, pact);
|
||||||
|
|
||||||
p->noise_radius = 8192;
|
p->noise_radius = 8192;
|
||||||
madenoise(snum);
|
madenoise(snum);
|
||||||
|
@ -3012,20 +3015,20 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
{
|
{
|
||||||
if (p->shotgun_state[1])
|
if (p->shotgun_state[1])
|
||||||
{
|
{
|
||||||
fi.shoot(pi, SHOTGUN);
|
fi.shoot(pact, SHOTGUN);
|
||||||
fi.shoot(pi, SHOTGUN);
|
fi.shoot(pact, SHOTGUN);
|
||||||
fi.shoot(pi, SHOTGUN);
|
fi.shoot(pact, SHOTGUN);
|
||||||
fi.shoot(pi, SHOTGUN);
|
fi.shoot(pact, SHOTGUN);
|
||||||
fi.shoot(pi, SHOTGUN);
|
fi.shoot(pact, SHOTGUN);
|
||||||
fi.shoot(pi, SHOTGUN);
|
fi.shoot(pact, SHOTGUN);
|
||||||
fi.shoot(pi, SHOTGUN);
|
fi.shoot(pact, SHOTGUN);
|
||||||
fi.shoot(pi, SHOTGUN);
|
fi.shoot(pact, SHOTGUN);
|
||||||
fi.shoot(pi, SHOTGUN);
|
fi.shoot(pact, SHOTGUN);
|
||||||
fi.shoot(pi, SHOTGUN);
|
fi.shoot(pact, SHOTGUN);
|
||||||
|
|
||||||
p->ammo_amount[SHOTGUN_WEAPON]--;
|
p->ammo_amount[SHOTGUN_WEAPON]--;
|
||||||
|
|
||||||
S_PlayActorSound(SHOTGUN_FIRE, pi);
|
S_PlayActorSound(SHOTGUN_FIRE, pact);
|
||||||
|
|
||||||
if (psectlotag != 857)
|
if (psectlotag != 857)
|
||||||
{
|
{
|
||||||
|
@ -3048,7 +3051,7 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
checkavailweapon(p);
|
checkavailweapon(p);
|
||||||
break;
|
break;
|
||||||
case 17:
|
case 17:
|
||||||
S_PlayActorSound(SHOTGUN_COCK, pi);
|
S_PlayActorSound(SHOTGUN_COCK, pact);
|
||||||
break;
|
break;
|
||||||
case 28:
|
case 28:
|
||||||
p->okickback_pic = p->kickback_pic = 0;
|
p->okickback_pic = p->kickback_pic = 0;
|
||||||
|
@ -3065,7 +3068,7 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
checkavailweapon(p);
|
checkavailweapon(p);
|
||||||
break;
|
break;
|
||||||
case 27:
|
case 27:
|
||||||
S_PlayActorSound(SHOTGUN_COCK, pi);
|
S_PlayActorSound(SHOTGUN_COCK, pact);
|
||||||
break;
|
break;
|
||||||
case 38:
|
case 38:
|
||||||
p->okickback_pic = p->kickback_pic = 0;
|
p->okickback_pic = p->kickback_pic = 0;
|
||||||
|
@ -3102,17 +3105,17 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
|
|
||||||
if ((p->kickback_pic % 3) == 0)
|
if ((p->kickback_pic % 3) == 0)
|
||||||
{
|
{
|
||||||
j = fi.spawn(pi, SHELL);
|
auto j = spawn(pact, SHELL);
|
||||||
|
|
||||||
sprite[j].ang += 1024;
|
j->s.ang += 1024;
|
||||||
sprite[j].ang &= 2047;
|
j->s.ang &= 2047;
|
||||||
sprite[j].xvel += 32;
|
j->s.xvel += 32;
|
||||||
sprite[j].z += (3 << 8);
|
j->s.z += (3 << 8);
|
||||||
ssp(j, CLIPMASK0);
|
ssp(j, CLIPMASK0);
|
||||||
}
|
}
|
||||||
|
|
||||||
S_PlayActorSound(CHAINGUN_FIRE, pi);
|
S_PlayActorSound(CHAINGUN_FIRE, pact);
|
||||||
fi.shoot(pi, CHAINGUN);
|
fi.shoot(pact, CHAINGUN);
|
||||||
p->noise_radius = 8192;
|
p->noise_radius = 8192;
|
||||||
madenoise(snum);
|
madenoise(snum);
|
||||||
lastvisinc = ud.levelclock + 32;
|
lastvisinc = ud.levelclock + 32;
|
||||||
|
@ -3145,7 +3148,7 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
if (p->kickback_pic > 3)
|
if (p->kickback_pic > 3)
|
||||||
{
|
{
|
||||||
p->okickback_pic = p->kickback_pic = 0;
|
p->okickback_pic = p->kickback_pic = 0;
|
||||||
fi.shoot(pi, GROWSPARK);
|
fi.shoot(pact, GROWSPARK);
|
||||||
p->noise_radius = 1024;
|
p->noise_radius = 1024;
|
||||||
madenoise(snum);
|
madenoise(snum);
|
||||||
checkavailweapon(p);
|
checkavailweapon(p);
|
||||||
|
@ -3158,7 +3161,7 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
if (p->kickback_pic == 1)
|
if (p->kickback_pic == 1)
|
||||||
{
|
{
|
||||||
p->ammo_amount[THROWSAW_WEAPON]--;
|
p->ammo_amount[THROWSAW_WEAPON]--;
|
||||||
fi.shoot(pi, SHRINKSPARK);
|
fi.shoot(pact, SHRINKSPARK);
|
||||||
checkavailweapon(p);
|
checkavailweapon(p);
|
||||||
}
|
}
|
||||||
p->kickback_pic++;
|
p->kickback_pic++;
|
||||||
|
@ -3172,8 +3175,8 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
{
|
{
|
||||||
p->visibility = 0;
|
p->visibility = 0;
|
||||||
lastvisinc = ud.levelclock + 32;
|
lastvisinc = ud.levelclock + 32;
|
||||||
S_PlayActorSound(CHAINGUN_FIRE, pi);
|
S_PlayActorSound(CHAINGUN_FIRE, pact);
|
||||||
fi.shoot(pi, SHOTSPARK1);
|
fi.shoot(pact, SHOTSPARK1);
|
||||||
p->noise_radius = 16384;
|
p->noise_radius = 16384;
|
||||||
madenoise(snum);
|
madenoise(snum);
|
||||||
p->ammo_amount[TIT_WEAPON]--;
|
p->ammo_amount[TIT_WEAPON]--;
|
||||||
|
@ -3199,8 +3202,8 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
{
|
{
|
||||||
p->visibility = 0;
|
p->visibility = 0;
|
||||||
lastvisinc = ud.levelclock + 32;
|
lastvisinc = ud.levelclock + 32;
|
||||||
S_PlayActorSound(CHAINGUN_FIRE, pi);
|
S_PlayActorSound(CHAINGUN_FIRE, pact);
|
||||||
fi.shoot(pi, CHAINGUN);
|
fi.shoot(pact, CHAINGUN);
|
||||||
p->noise_radius = 16384;
|
p->noise_radius = 16384;
|
||||||
madenoise(snum);
|
madenoise(snum);
|
||||||
p->ammo_amount[MOTORCYCLE_WEAPON]--;
|
p->ammo_amount[MOTORCYCLE_WEAPON]--;
|
||||||
|
@ -3227,7 +3230,7 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
{
|
{
|
||||||
p->MotoSpeed -= 20;
|
p->MotoSpeed -= 20;
|
||||||
p->ammo_amount[BOAT_WEAPON]--;
|
p->ammo_amount[BOAT_WEAPON]--;
|
||||||
fi.shoot(pi, RRTILE1790);
|
fi.shoot(pact, RRTILE1790);
|
||||||
}
|
}
|
||||||
p->kickback_pic++;
|
p->kickback_pic++;
|
||||||
if (p->kickback_pic > 20)
|
if (p->kickback_pic > 20)
|
||||||
|
@ -3244,11 +3247,11 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
case ALIENBLASTER_WEAPON:
|
case ALIENBLASTER_WEAPON:
|
||||||
p->kickback_pic++;
|
p->kickback_pic++;
|
||||||
if (p->kickback_pic >= 7 && p->kickback_pic <= 11)
|
if (p->kickback_pic >= 7 && p->kickback_pic <= 11)
|
||||||
fi.shoot(pi, FIRELASER);
|
fi.shoot(pact, FIRELASER);
|
||||||
|
|
||||||
if (p->kickback_pic == 5)
|
if (p->kickback_pic == 5)
|
||||||
{
|
{
|
||||||
S_PlayActorSound(CAT_FIRE, pi);
|
S_PlayActorSound(CAT_FIRE, pact);
|
||||||
p->noise_radius = 2048;
|
p->noise_radius = 2048;
|
||||||
madenoise(snum);
|
madenoise(snum);
|
||||||
}
|
}
|
||||||
|
@ -3286,11 +3289,11 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
i = -512 - mulscale16(p->horizon.sum().asq16(), 20);
|
i = -512 - mulscale16(p->horizon.sum().asq16(), 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
j = EGS(p->cursectnum,
|
EGS(p->cursectnum,
|
||||||
p->posx + (sintable[(p->angle.ang.asbuild() + 512) & 2047] >> 6),
|
p->posx + (sintable[(p->angle.ang.asbuild() + 512) & 2047] >> 6),
|
||||||
p->posy + (sintable[p->angle.ang.asbuild() & 2047] >> 6),
|
p->posy + (sintable[p->angle.ang.asbuild() & 2047] >> 6),
|
||||||
p->posz, TRIPBOMBSPRITE, -16, 9, 9,
|
p->posz, TRIPBOMBSPRITE, -16, 9, 9,
|
||||||
p->angle.ang.asbuild(), k * 2, i, pi, 1);
|
p->angle.ang.asbuild(), k * 2, i, pact, 1);
|
||||||
}
|
}
|
||||||
p->kickback_pic++;
|
p->kickback_pic++;
|
||||||
if (p->kickback_pic > 20)
|
if (p->kickback_pic > 20)
|
||||||
|
@ -3304,8 +3307,8 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
if (p->kickback_pic == 30)
|
if (p->kickback_pic == 30)
|
||||||
{
|
{
|
||||||
p->ammo_amount[BOWLING_WEAPON]--;
|
p->ammo_amount[BOWLING_WEAPON]--;
|
||||||
S_PlayActorSound(354, pi);
|
S_PlayActorSound(354, pact);
|
||||||
fi.shoot(pi, BOWLINGBALL);
|
fi.shoot(pact, BOWLINGBALL);
|
||||||
p->noise_radius = 1024;
|
p->noise_radius = 1024;
|
||||||
madenoise(snum);
|
madenoise(snum);
|
||||||
}
|
}
|
||||||
|
@ -3326,10 +3329,10 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
case KNEE_WEAPON:
|
case KNEE_WEAPON:
|
||||||
p->kickback_pic++;
|
p->kickback_pic++;
|
||||||
if (p->kickback_pic == 3)
|
if (p->kickback_pic == 3)
|
||||||
S_PlayActorSound(426, pi);
|
S_PlayActorSound(426, pact);
|
||||||
if (p->kickback_pic == 12)
|
if (p->kickback_pic == 12)
|
||||||
{
|
{
|
||||||
fi.shoot(pi, KNEE);
|
fi.shoot(pact, KNEE);
|
||||||
p->noise_radius = 1024;
|
p->noise_radius = 1024;
|
||||||
madenoise(snum);
|
madenoise(snum);
|
||||||
}
|
}
|
||||||
|
@ -3344,10 +3347,10 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
case SLINGBLADE_WEAPON:
|
case SLINGBLADE_WEAPON:
|
||||||
p->kickback_pic++;
|
p->kickback_pic++;
|
||||||
if (p->kickback_pic == 3)
|
if (p->kickback_pic == 3)
|
||||||
S_PlayActorSound(252, pi);
|
S_PlayActorSound(252, pact);
|
||||||
if (p->kickback_pic == 8)
|
if (p->kickback_pic == 8)
|
||||||
{
|
{
|
||||||
fi.shoot(pi, SLINGBLADE);
|
fi.shoot(pact, SLINGBLADE);
|
||||||
p->noise_radius = 1024;
|
p->noise_radius = 1024;
|
||||||
madenoise(snum);
|
madenoise(snum);
|
||||||
}
|
}
|
||||||
|
@ -3367,13 +3370,13 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
p->ammo_amount[DYNAMITE_WEAPON]--;
|
p->ammo_amount[DYNAMITE_WEAPON]--;
|
||||||
lastvisinc = ud.levelclock + 32;
|
lastvisinc = ud.levelclock + 32;
|
||||||
p->visibility = 0;
|
p->visibility = 0;
|
||||||
fi.shoot(pi, RPG);
|
fi.shoot(pact, RPG);
|
||||||
p->noise_radius = 32768;
|
p->noise_radius = 32768;
|
||||||
madenoise(snum);
|
madenoise(snum);
|
||||||
checkavailweapon(p);
|
checkavailweapon(p);
|
||||||
}
|
}
|
||||||
else if (p->kickback_pic == 16)
|
else if (p->kickback_pic == 16)
|
||||||
S_PlayActorSound(450, pi);
|
S_PlayActorSound(450, pact);
|
||||||
else if (p->kickback_pic == 34)
|
else if (p->kickback_pic == 34)
|
||||||
p->okickback_pic = p->kickback_pic = 0;
|
p->okickback_pic = p->kickback_pic = 0;
|
||||||
break;
|
break;
|
||||||
|
@ -3385,13 +3388,13 @@ static void operateweapon(int snum, ESyncBits actions, int psect)
|
||||||
p->ammo_amount[CHICKEN_WEAPON]--;
|
p->ammo_amount[CHICKEN_WEAPON]--;
|
||||||
lastvisinc = ud.levelclock + 32;
|
lastvisinc = ud.levelclock + 32;
|
||||||
p->visibility = 0;
|
p->visibility = 0;
|
||||||
fi.shoot(pi, RPG2);
|
fi.shoot(pact, RPG2);
|
||||||
p->noise_radius = 32768;
|
p->noise_radius = 32768;
|
||||||
madenoise(snum);
|
madenoise(snum);
|
||||||
checkavailweapon(p);
|
checkavailweapon(p);
|
||||||
}
|
}
|
||||||
else if (p->kickback_pic == 16)
|
else if (p->kickback_pic == 16)
|
||||||
S_PlayActorSound(450, pi);
|
S_PlayActorSound(450, pact);
|
||||||
else if (p->kickback_pic == 34)
|
else if (p->kickback_pic == 34)
|
||||||
p->okickback_pic = p->kickback_pic = 0;
|
p->okickback_pic = p->kickback_pic = 0;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -65,10 +65,10 @@ void DoFire(struct player_struct *p, short snum)
|
||||||
|
|
||||||
SetGameVarID(g_iWeaponVarID, p->curr_weapon, p->GetActor(), snum);
|
SetGameVarID(g_iWeaponVarID, p->curr_weapon, p->GetActor(), snum);
|
||||||
SetGameVarID(g_iWorksLikeVarID,aplWeaponWorksLike[p->curr_weapon][snum], p->GetActor(), snum);
|
SetGameVarID(g_iWorksLikeVarID,aplWeaponWorksLike[p->curr_weapon][snum], p->GetActor(), snum);
|
||||||
fi.shoot(p->i,aplWeaponShoots[p->curr_weapon][snum]);
|
fi.shoot(p->GetActor(), aplWeaponShoots[p->curr_weapon][snum]);
|
||||||
for(i=1;i<aplWeaponShotsPerBurst[p->curr_weapon][snum];i++)
|
for(i=1;i<aplWeaponShotsPerBurst[p->curr_weapon][snum];i++)
|
||||||
{
|
{
|
||||||
fi.shoot(p->i,aplWeaponShoots[p->curr_weapon][snum]);
|
fi.shoot(p->GetActor(), aplWeaponShoots[p->curr_weapon][snum]);
|
||||||
if( aplWeaponFlags[p->curr_weapon][snum] & WEAPON_FLAG_AMMOPERSHOT)
|
if( aplWeaponFlags[p->curr_weapon][snum] & WEAPON_FLAG_AMMOPERSHOT)
|
||||||
{
|
{
|
||||||
p->ammo_amount[p->curr_weapon]--;
|
p->ammo_amount[p->curr_weapon]--;
|
||||||
|
@ -406,7 +406,7 @@ void operateweapon_ww(int snum, ESyncBits actions, int psect)
|
||||||
}
|
}
|
||||||
SetGameVarID(g_iWeaponVarID, p->curr_weapon, p->GetActor(), snum);
|
SetGameVarID(g_iWeaponVarID, p->curr_weapon, p->GetActor(), snum);
|
||||||
SetGameVarID(g_iWorksLikeVarID, aplWeaponWorksLike[p->curr_weapon][snum], p->GetActor(), snum);
|
SetGameVarID(g_iWorksLikeVarID, aplWeaponWorksLike[p->curr_weapon][snum], p->GetActor(), snum);
|
||||||
fi.shoot(pi, aplWeaponShoots[p->curr_weapon][snum]);
|
fi.shoot(p->GetActor(), aplWeaponShoots[p->curr_weapon][snum]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1208,7 +1208,7 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
|
||||||
case FETUSBROKE:
|
case FETUSBROKE:
|
||||||
for (j = 0; j < 48; j++)
|
for (j = 0; j < 48; j++)
|
||||||
{
|
{
|
||||||
fi.shoot(targ->GetIndex(), BLOODSPLAT1);
|
fi.shoot(targ, BLOODSPLAT1);
|
||||||
s->ang += 333;
|
s->ang += 333;
|
||||||
}
|
}
|
||||||
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
|
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
|
||||||
|
@ -1326,23 +1326,22 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
|
||||||
{
|
{
|
||||||
s->extra -= pspr->extra;
|
s->extra -= pspr->extra;
|
||||||
if (s->extra > 0) break;
|
if (s->extra > 0) break;
|
||||||
int i = targ->GetIndex();
|
|
||||||
s->ang = krand() & 2047;
|
s->ang = krand() & 2047;
|
||||||
fi.shoot(i, BLOODSPLAT1);
|
fi.shoot(targ, BLOODSPLAT1);
|
||||||
s->ang = krand() & 2047;
|
s->ang = krand() & 2047;
|
||||||
fi.shoot(i, BLOODSPLAT2);
|
fi.shoot(targ, BLOODSPLAT2);
|
||||||
s->ang = krand() & 2047;
|
s->ang = krand() & 2047;
|
||||||
fi.shoot(i, BLOODSPLAT3);
|
fi.shoot(targ, BLOODSPLAT3);
|
||||||
s->ang = krand() & 2047;
|
s->ang = krand() & 2047;
|
||||||
fi.shoot(i, BLOODSPLAT4);
|
fi.shoot(targ, BLOODSPLAT4);
|
||||||
s->ang = krand() & 2047;
|
s->ang = krand() & 2047;
|
||||||
fi.shoot(i, BLOODSPLAT1);
|
fi.shoot(targ, BLOODSPLAT1);
|
||||||
s->ang = krand() & 2047;
|
s->ang = krand() & 2047;
|
||||||
fi.shoot(i, BLOODSPLAT2);
|
fi.shoot(targ, BLOODSPLAT2);
|
||||||
s->ang = krand() & 2047;
|
s->ang = krand() & 2047;
|
||||||
fi.shoot(i, BLOODSPLAT3);
|
fi.shoot(targ, BLOODSPLAT3);
|
||||||
s->ang = krand() & 2047;
|
s->ang = krand() & 2047;
|
||||||
fi.shoot(i, BLOODSPLAT4);
|
fi.shoot(targ, BLOODSPLAT4);
|
||||||
fi.guts(targ, JIBS1, 1, myconnectindex);
|
fi.guts(targ, JIBS1, 1, myconnectindex);
|
||||||
fi.guts(targ, JIBS2, 2, myconnectindex);
|
fi.guts(targ, JIBS2, 2, myconnectindex);
|
||||||
fi.guts(targ, JIBS3, 3, myconnectindex);
|
fi.guts(targ, JIBS3, 3, myconnectindex);
|
||||||
|
@ -1407,11 +1406,10 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
|
||||||
if (j >= 0 && sprite[j].picnum == APLAYER && s->picnum != ROTATEGUN && s->picnum != DRONE)
|
if (j >= 0 && sprite[j].picnum == APLAYER && s->picnum != ROTATEGUN && s->picnum != DRONE)
|
||||||
if (ps[sprite[j].yvel].curr_weapon == SHOTGUN_WEAPON)
|
if (ps[sprite[j].yvel].curr_weapon == SHOTGUN_WEAPON)
|
||||||
{
|
{
|
||||||
int i = targ->GetIndex();
|
fi.shoot(targ, BLOODSPLAT3);
|
||||||
fi.shoot(i, BLOODSPLAT3);
|
fi.shoot(targ, BLOODSPLAT1);
|
||||||
fi.shoot(i, BLOODSPLAT1);
|
fi.shoot(targ, BLOODSPLAT2);
|
||||||
fi.shoot(i, BLOODSPLAT2);
|
fi.shoot(targ, BLOODSPLAT4);
|
||||||
fi.shoot(i, BLOODSPLAT4);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s->picnum != TANK && !bossguy(targ) && s->picnum != RECON && s->picnum != ROTATEGUN)
|
if (s->picnum != TANK && !bossguy(targ) && s->picnum != RECON && s->picnum != ROTATEGUN)
|
||||||
|
|
|
@ -2368,11 +2368,10 @@ void checkhitsprite_r(DDukeActor* targ, DDukeActor* proj)
|
||||||
if (j >= 0 && sprite[j].picnum == APLAYER && s->picnum != DRONE)
|
if (j >= 0 && sprite[j].picnum == APLAYER && s->picnum != DRONE)
|
||||||
if (ps[sprite[j].yvel].curr_weapon == SHOTGUN_WEAPON)
|
if (ps[sprite[j].yvel].curr_weapon == SHOTGUN_WEAPON)
|
||||||
{
|
{
|
||||||
int i = targ->GetIndex();
|
fi.shoot(targ, BLOODSPLAT3);
|
||||||
fi.shoot(i, BLOODSPLAT3);
|
fi.shoot(targ, BLOODSPLAT1);
|
||||||
fi.shoot(i, BLOODSPLAT1);
|
fi.shoot(targ, BLOODSPLAT2);
|
||||||
fi.shoot(i, BLOODSPLAT2);
|
fi.shoot(targ, BLOODSPLAT4);
|
||||||
fi.shoot(i, BLOODSPLAT4);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s->statnum == 2)
|
if (s->statnum == 2)
|
||||||
|
|
Loading…
Reference in a new issue