mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-01 14:11:01 +00:00
- checkweapons_r.
This commit is contained in:
parent
635b53f78f
commit
8d55138db0
1 changed files with 14 additions and 15 deletions
|
@ -1484,15 +1484,14 @@ void checkweapons_r(struct player_struct* p)
|
||||||
static const short weapon_sprites[MAX_WEAPONS] = { KNEE, FIRSTGUNSPRITE, SHOTGUNSPRITE,
|
static const short weapon_sprites[MAX_WEAPONS] = { KNEE, FIRSTGUNSPRITE, SHOTGUNSPRITE,
|
||||||
CHAINGUNSPRITE, RPGSPRITE, HEAVYHBOMB, SHRINKERSPRITE, DEVISTATORSPRITE,
|
CHAINGUNSPRITE, RPGSPRITE, HEAVYHBOMB, SHRINKERSPRITE, DEVISTATORSPRITE,
|
||||||
TRIPBOMBSPRITE, BOWLINGBALLSPRITE, FREEZEBLAST, HEAVYHBOMB };
|
TRIPBOMBSPRITE, BOWLINGBALLSPRITE, FREEZEBLAST, HEAVYHBOMB };
|
||||||
short i, j;
|
|
||||||
|
|
||||||
if (isRRRA())
|
if (isRRRA())
|
||||||
{
|
{
|
||||||
if (p->OnMotorcycle && numplayers > 1)
|
if (p->OnMotorcycle && numplayers > 1)
|
||||||
{
|
{
|
||||||
j = fi.spawn(p->i, 7220);
|
auto j = spawn(p->GetActor(), 7220);
|
||||||
sprite[j].ang = p->angle.ang.asbuild();
|
j->s.ang = p->angle.ang.asbuild();
|
||||||
sprite[j].owner = p->ammo_amount[MOTORCYCLE_WEAPON];
|
j->s.owner = p->ammo_amount[MOTORCYCLE_WEAPON];
|
||||||
p->OnMotorcycle = 0;
|
p->OnMotorcycle = 0;
|
||||||
p->gotweapon.Clear(MOTORCYCLE_WEAPON);
|
p->gotweapon.Clear(MOTORCYCLE_WEAPON);
|
||||||
p->horizon.horiz = q16horiz(0);
|
p->horizon.horiz = q16horiz(0);
|
||||||
|
@ -1506,9 +1505,9 @@ void checkweapons_r(struct player_struct* p)
|
||||||
}
|
}
|
||||||
else if (p->OnBoat && numplayers > 1)
|
else if (p->OnBoat && numplayers > 1)
|
||||||
{
|
{
|
||||||
j = fi.spawn(p->i, 7233);
|
auto j = spawn(p->GetActor(), 7233);
|
||||||
sprite[j].ang = p->angle.ang.asbuild();
|
j->s.ang = p->angle.ang.asbuild();
|
||||||
sprite[j].owner = p->ammo_amount[BOAT_WEAPON];
|
j->s.owner = p->ammo_amount[BOAT_WEAPON];
|
||||||
p->OnBoat = 0;
|
p->OnBoat = 0;
|
||||||
p->gotweapon.Clear(BOAT_WEAPON);
|
p->gotweapon.Clear(BOAT_WEAPON);
|
||||||
p->horizon.horiz = q16horiz(0);
|
p->horizon.horiz = q16horiz(0);
|
||||||
|
@ -1525,36 +1524,36 @@ void checkweapons_r(struct player_struct* p)
|
||||||
if (p->curr_weapon > 0)
|
if (p->curr_weapon > 0)
|
||||||
{
|
{
|
||||||
if (krand() & 1)
|
if (krand() & 1)
|
||||||
fi.spawn(p->i, weapon_sprites[p->curr_weapon]);
|
spawn(p->GetActor(), weapon_sprites[p->curr_weapon]);
|
||||||
else switch (p->curr_weapon)
|
else switch (p->curr_weapon)
|
||||||
{
|
{
|
||||||
case CHICKEN_WEAPON:
|
case CHICKEN_WEAPON:
|
||||||
if (!isRRRA()) break;
|
if (!isRRRA()) break;
|
||||||
case DYNAMITE_WEAPON:
|
case DYNAMITE_WEAPON:
|
||||||
case CROSSBOW_WEAPON:
|
case CROSSBOW_WEAPON:
|
||||||
fi.spawn(p->i, EXPLOSION2);
|
spawn(p->GetActor(), EXPLOSION2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 5; i++)
|
for (int i = 0; i < 5; i++)
|
||||||
{
|
{
|
||||||
if (p->keys[i] == 1)
|
if (p->keys[i] == 1)
|
||||||
{
|
{
|
||||||
j = fi.spawn(p->i, ACCESSCARD);
|
auto j = spawn(p->GetActor(), ACCESSCARD);
|
||||||
switch (i)
|
switch (i)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
sprite[j].lotag = 100;
|
j->s.lotag = 100;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
sprite[j].lotag = 101;
|
j->s.lotag = 101;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
sprite[j].lotag = 102;
|
j->s.lotag = 102;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
sprite[j].lotag = 103;
|
j->s.lotag = 103;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue