- Duke: Replace player_struct posyv with vel.Y calls.

This commit is contained in:
Mitchell Richters 2021-12-30 22:18:56 +11:00
parent 31ed257f39
commit b2023efb44
11 changed files with 71 additions and 71 deletions

View file

@ -760,11 +760,11 @@ int ifhitbyweapon_d(DDukeActor *actor)
case OOZFILTER:
case EXPLODINGBARREL:
ps[p].vel.X += actor->extra * bcos(actor->ang, 2);
ps[p].posyv += actor->extra * bsin(actor->ang, 2);
ps[p].vel.Y += actor->extra * bsin(actor->ang, 2);
break;
default:
ps[p].vel.X += actor->extra * bcos(actor->ang, 1);
ps[p].posyv += actor->extra * bsin(actor->ang, 1);
ps[p].vel.Y += actor->extra * bsin(actor->ang, 1);
break;
}
}
@ -1986,7 +1986,7 @@ void movetransports_d(void)
Owner->sector()->ceilingz + (7 << 8);
ps[p].vel.X = 4096 - (krand() & 8192);
ps[p].posyv = 4096 - (krand() & 8192);
ps[p].vel.Y = 4096 - (krand() & 8192);
}
@ -3700,7 +3700,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
int newx, newy;
newx = ps[playernum].pos.X + (ps[playernum].vel.X / 768);
newy = ps[playernum].pos.Y + (ps[playernum].posyv / 768);
newy = ps[playernum].pos.Y + (ps[playernum].vel.Y / 768);
goalang = getangle(newx - actor->spr.pos.X, newy - actor->spr.pos.Y);
angdif = getincangle(actor->spr.ang, goalang) >> 2;
if (angdif > -8 && angdif < 0) angdif = 0;
@ -3806,12 +3806,12 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
if (xvel < 512)
{
ps[playernum].vel.X = 0;
ps[playernum].posyv = 0;
ps[playernum].vel.Y = 0;
}
else
{
ps[playernum].vel.X = MulScale(ps[playernum].vel.X, gs.playerfriction - 0x2000, 16);
ps[playernum].posyv = MulScale(ps[playernum].posyv, gs.playerfriction - 0x2000, 16);
ps[playernum].vel.Y = MulScale(ps[playernum].vel.Y, gs.playerfriction - 0x2000, 16);
}
}
else if (actor->spr.picnum != DRONE && actor->spr.picnum != SHARK && actor->spr.picnum != COMMANDER)

View file

@ -684,11 +684,11 @@ int ifhitbyweapon_r(DDukeActor *actor)
case TRIPBOMBSPRITE:
case RPG2:
ps[p].vel.X += actor->extra * bcos(actor->ang, 2);
ps[p].posyv += actor->extra * bsin(actor->ang, 2);
ps[p].vel.Y += actor->extra * bsin(actor->ang, 2);
break;
default:
ps[p].vel.X += actor->extra * bcos(actor->ang, 1);
ps[p].posyv += actor->extra * bsin(actor->ang, 1);
ps[p].vel.Y += actor->extra * bsin(actor->ang, 1);
break;
}
}
@ -3745,7 +3745,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
int newx, newy;
newx = ps[pnum].pos.X + (ps[pnum].vel.X / 768);
newy = ps[pnum].pos.Y + (ps[pnum].posyv / 768);
newy = ps[pnum].pos.Y + (ps[pnum].vel.Y / 768);
goalang = getangle(newx - actor->spr.pos.X, newy - actor->spr.pos.Y);
angdif = getincangle(actor->spr.ang, goalang) >> 2;
if (angdif > -8 && angdif < 0) angdif = 0;
@ -3855,12 +3855,12 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
if (xvel < 512)
{
ps[pnum].vel.X = 0;
ps[pnum].posyv = 0;
ps[pnum].vel.Y = 0;
}
else
{
ps[pnum].vel.X = MulScale(ps[pnum].vel.X, gs.playerfriction - 0x2000, 16);
ps[pnum].posyv = MulScale(ps[pnum].posyv, gs.playerfriction - 0x2000, 16);
ps[pnum].vel.Y = MulScale(ps[pnum].vel.Y, gs.playerfriction - 0x2000, 16);
}
}
else if ((isRRRA() && actor->spr.picnum != DRONE && actor->spr.picnum != SHARK && actor->spr.picnum != UFO1_RRRA) ||

View file

@ -408,8 +408,8 @@ void DoPlayer(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
break;
case PLAYER_POSYV:
if (bSet) ps[iPlayer].posyv = lValue;
else SetGameVarID(lVar2, ps[iPlayer].posyv, sActor, sPlayer);
if (bSet) ps[iPlayer].vel.Y = lValue;
else SetGameVarID(lVar2, ps[iPlayer].vel.Y, sActor, sPlayer);
break;
case PLAYER_POSZV:
@ -2276,7 +2276,7 @@ int ParseState::parse(void)
ps[g_p].footprintcount = 0;
ps[g_p].weapreccnt = 0;
ps[g_p].ftq = 0;
ps[g_p].vel.X = ps[g_p].posyv = 0;
ps[g_p].vel.X = ps[g_p].vel.Y = 0;
if (!isRR()) ps[g_p].angle.orotscrnang = ps[g_p].angle.rotscrnang = buildang(0);
ps[g_p].falling_counter = 0;
@ -2474,7 +2474,7 @@ int ParseState::parse(void)
insptr++;
forceplayerangle(g_p);
ps[g_p].vel.X -= ps[g_p].angle.ang.bcos(7);
ps[g_p].posyv -= ps[g_p].angle.ang.bsin(7);
ps[g_p].vel.Y -= ps[g_p].angle.ang.bsin(7);
return 0;
case concmd_wackplayer:
insptr++;
@ -2483,7 +2483,7 @@ int ParseState::parse(void)
else
{
ps[g_p].vel.X -= ps[g_p].angle.ang.bcos(10);
ps[g_p].posyv -= ps[g_p].angle.ang.bsin(10);
ps[g_p].vel.Y -= ps[g_p].angle.ang.bsin(10);
ps[g_p].jumping_counter = 767;
ps[g_p].jumping_toggle = 1;
}

View file

@ -1087,7 +1087,7 @@ DEFINE_FIELD_X(DukePlayer, player_struct, bobposy)
DEFINE_FIELD_X(DukePlayer, player_struct, pyoff)
DEFINE_FIELD_X(DukePlayer, player_struct, opyoff)
//DEFINE_FIELD_X(DukePlayer, player_struct, posxv)
DEFINE_FIELD_X(DukePlayer, player_struct, posyv)
//DEFINE_FIELD_X(DukePlayer, player_struct, posyv)
DEFINE_FIELD_X(DukePlayer, player_struct, poszv)
DEFINE_FIELD_X(DukePlayer, player_struct, last_pissed_time)
DEFINE_FIELD_X(DukePlayer, player_struct, truefz)

View file

@ -1917,7 +1917,7 @@ static void movement(int snum, ESyncBits actions, sectortype* psect, int fz, int
{
p->jumping_counter = 0;
if (p->poszv < 0)
p->vel.X = p->posyv = 0;
p->vel.X = p->vel.Y = 0;
p->poszv = 128;
p->pos.Z = cz + (4 << 8);
}
@ -2784,7 +2784,7 @@ void processinput_d(int snum)
{
j = getangle(clz.actor()->spr.pos.X - p->pos.X, clz.actor()->spr.pos.Y - p->pos.Y);
p->vel.X -= bcos(j, 4);
p->posyv -= bsin(j, 4);
p->vel.Y -= bsin(j, 4);
}
}
@ -2829,7 +2829,7 @@ void processinput_d(int snum)
if (p->newOwner != nullptr)
{
p->vel.X = p->posyv = pact->spr.xvel = 0;
p->vel.X = p->vel.Y = pact->spr.xvel = 0;
fi.doincrements(p);
@ -2877,7 +2877,7 @@ void processinput_d(int snum)
{
doubvel = 0;
p->vel.X = 0;
p->posyv = 0;
p->vel.Y = 0;
}
else if (SyncInput())
{
@ -2928,7 +2928,7 @@ void processinput_d(int snum)
}
}
if (p->vel.X || p->posyv || sb_fvel || sb_svel)
if (p->vel.X || p->vel.Y || sb_fvel || sb_svel)
{
p->crack_time = CRACK_TIME;
@ -2971,7 +2971,7 @@ void processinput_d(int snum)
doubvel <<= 1;
p->vel.X += ((sb_fvel * doubvel) << 6);
p->posyv += ((sb_svel * doubvel) << 6);
p->vel.Y += ((sb_svel * doubvel) << 6);
bool check;
@ -2980,31 +2980,31 @@ void processinput_d(int snum)
if (check)
{
p->vel.X = MulScale(p->vel.X, gs.playerfriction - 0x2000, 16);
p->posyv = MulScale(p->posyv, gs.playerfriction - 0x2000, 16);
p->vel.Y = MulScale(p->vel.Y, gs.playerfriction - 0x2000, 16);
}
else
{
if (psectlotag == 2)
{
p->vel.X = MulScale(p->vel.X, gs.playerfriction - 0x1400, 16);
p->posyv = MulScale(p->posyv, gs.playerfriction - 0x1400, 16);
p->vel.Y = MulScale(p->vel.Y, gs.playerfriction - 0x1400, 16);
}
else
{
p->vel.X = MulScale(p->vel.X, gs.playerfriction, 16);
p->posyv = MulScale(p->posyv, gs.playerfriction, 16);
p->vel.Y = MulScale(p->vel.Y, gs.playerfriction, 16);
}
}
if (abs(p->vel.X) < 2048 && abs(p->posyv) < 2048)
p->vel.X = p->posyv = 0;
if (abs(p->vel.X) < 2048 && abs(p->vel.Y) < 2048)
p->vel.X = p->vel.Y = 0;
if (shrunk)
{
p->vel.X =
MulScale(p->vel.X, gs.playerfriction - (gs.playerfriction >> 1) + (gs.playerfriction >> 2), 16);
p->posyv =
MulScale(p->posyv, gs.playerfriction - (gs.playerfriction >> 1) + (gs.playerfriction >> 2), 16);
p->vel.Y =
MulScale(p->vel.Y, gs.playerfriction - (gs.playerfriction >> 1) + (gs.playerfriction >> 2), 16);
}
}
@ -3020,12 +3020,12 @@ HORIZONLY:
if (ud.clipping)
{
p->pos.X += p->vel.X >> 14;
p->pos.Y += p->posyv >> 14;
p->pos.Y += p->vel.Y >> 14;
updatesector(p->pos.X, p->pos.Y, &p->cursector);
ChangeActorSect(pact, p->cursector);
}
else
clipmove(p->pos, &p->cursector, p->vel.X, p->posyv, 164, (4 << 8), ii, CLIPMASK0, clip);
clipmove(p->pos, &p->cursector, p->vel.X, p->vel.Y, 164, (4 << 8), ii, CLIPMASK0, clip);
if (p->jetpack_on == 0 && psectlotag != 2 && psectlotag != 1 && shrunk)
p->pos.Z += 32 << 8;

View file

@ -1324,7 +1324,7 @@ int doincrements_r(struct player_struct* p)
p->noise_radius = 16384;
madenoise(screenpeek);
p->vel.X += p->angle.ang.bcos(4);
p->posyv += p->angle.ang.bsin(4);
p->vel.Y += p->angle.ang.bsin(4);
}
p->eat -= 4;
if (p->eat < 0)
@ -1799,7 +1799,7 @@ static void onMotorcycle(int snum, ESyncBits &actions)
}
p->vel.X += currSpeed * bcos(velAdjustment * -51 + p->angle.ang.asbuild(), 4);
p->posyv += currSpeed * bsin(velAdjustment * -51 + p->angle.ang.asbuild(), 4);
p->vel.Y += currSpeed * bsin(velAdjustment * -51 + p->angle.ang.asbuild(), 4);
p->angle.addadjustment(getincanglebam(p->angle.ang, p->angle.ang - bamang(angAdjustment)));
}
else if (p->MotoSpeed >= 20 && p->on_ground == 1 && (p->moto_on_mud || p->moto_on_oil))
@ -1808,7 +1808,7 @@ static void onMotorcycle(int snum, ESyncBits &actions)
velAdjustment = rng == 0 ? -10 : 10;
currSpeed = MulScale(currSpeed, p->moto_on_oil ? 10 : 5, 7);
p->vel.X += currSpeed * bcos(velAdjustment * -51 + p->angle.ang.asbuild(), 4);
p->posyv += currSpeed * bsin(velAdjustment * -51 + p->angle.ang.asbuild(), 4);
p->vel.Y += currSpeed * bsin(velAdjustment * -51 + p->angle.ang.asbuild(), 4);
}
p->moto_on_mud = p->moto_on_oil = 0;
@ -2043,7 +2043,7 @@ static void onBoat(int snum, ESyncBits &actions)
}
p->vel.X += currSpeed * bcos(velAdjustment * -51 + p->angle.ang.asbuild(), 4);
p->posyv += currSpeed * bsin(velAdjustment * -51 + p->angle.ang.asbuild(), 4);
p->vel.Y += currSpeed * bsin(velAdjustment * -51 + p->angle.ang.asbuild(), 4);
p->angle.addadjustment(getincanglebam(p->angle.ang, p->angle.ang - bamang(angAdjustment)));
}
if (p->NotOnWater && p->MotoSpeed > 50)
@ -2274,7 +2274,7 @@ static void movement(int snum, ESyncBits actions, sectortype* psect, int fz, int
{
p->jumping_counter = 0;
if (p->poszv < 0)
p->vel.X = p->posyv = 0;
p->vel.X = p->vel.Y = 0;
p->poszv = 128;
p->pos.Z = cz + (4 << 8);
}
@ -2799,7 +2799,7 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
if (psectlotag != 857)
{
p->vel.X -= p->angle.ang.bcos(4);
p->posyv -= p->angle.ang.bsin(4);
p->vel.Y -= p->angle.ang.bsin(4);
}
}
else if (p->kickback_pic == 2)
@ -2899,13 +2899,13 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
if (psectlotag != 857)
{
p->vel.X -= p->angle.ang.bcos(5);
p->posyv -= p->angle.ang.bsin(5);
p->vel.Y -= p->angle.ang.bsin(5);
}
}
else if (psectlotag != 857)
{
p->vel.X -= p->angle.ang.bcos(4);
p->posyv -= p->angle.ang.bsin(4);
p->vel.Y -= p->angle.ang.bsin(4);
}
}
@ -2993,7 +2993,7 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
if (psectlotag != 857)
{
p->vel.X -= p->angle.ang.bcos(4);
p->posyv -= p->angle.ang.bsin(4);
p->vel.Y -= p->angle.ang.bsin(4);
}
checkavailweapon(p);
@ -3134,7 +3134,7 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
else if (p->kickback_pic == 12)
{
p->vel.X -= p->angle.ang.bcos(4);
p->posyv -= p->angle.ang.bsin(4);
p->vel.Y -= p->angle.ang.bsin(4);
p->horizon.addadjustment(20);
p->recoil += 20;
}
@ -3184,7 +3184,7 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
if (p->kickback_pic < 30)
{
p->vel.X += p->angle.ang.bcos(4);
p->posyv += p->angle.ang.bsin(4);
p->vel.Y += p->angle.ang.bsin(4);
}
p->kickback_pic++;
if (p->kickback_pic > 40)
@ -3475,7 +3475,7 @@ void processinput_r(int snum)
{
int j = getangle(clz.actor()->spr.pos.X - p->pos.X, clz.actor()->spr.pos.Y - p->pos.Y);
p->vel.X -= bcos(j, 4);
p->posyv -= bsin(j, 4);
p->vel.Y -= bsin(j, 4);
}
if (clz.actor()->spr.picnum == LADDER)
{
@ -3545,7 +3545,7 @@ void processinput_r(int snum)
if (p->newOwner != nullptr)
{
p->vel.X = p->posyv = pact->spr.xvel = 0;
p->vel.X = p->vel.Y = pact->spr.xvel = 0;
fi.doincrements(p);
@ -3608,7 +3608,7 @@ void processinput_r(int snum)
{
doubvel = 0;
p->vel.X = 0;
p->posyv = 0;
p->vel.Y = 0;
}
else if (SyncInput())
{
@ -3641,7 +3641,7 @@ void processinput_r(int snum)
}
}
if (p->vel.X || p->posyv || sb_fvel || sb_svel)
if (p->vel.X || p->vel.Y || sb_fvel || sb_svel)
{
p->crack_time = CRACK_TIME;
@ -3691,24 +3691,24 @@ void processinput_r(int snum)
doubvel <<= 1;
p->vel.X += ((sb_fvel * doubvel) << 6);
p->posyv += ((sb_svel * doubvel) << 6);
p->vel.Y += ((sb_svel * doubvel) << 6);
if (!isRRRA() && ((p->curr_weapon == KNEE_WEAPON && p->kickback_pic > 10 && p->on_ground) || (p->on_ground && (actions & SB_CROUCH))))
{
p->vel.X = MulScale(p->vel.X, gs.playerfriction - 0x2000, 16);
p->posyv = MulScale(p->posyv, gs.playerfriction - 0x2000, 16);
p->vel.Y = MulScale(p->vel.Y, gs.playerfriction - 0x2000, 16);
}
else
{
if (psectlotag == 2)
{
p->vel.X = MulScale(p->vel.X, gs.playerfriction - 0x1400, 16);
p->posyv = MulScale(p->posyv, gs.playerfriction - 0x1400, 16);
p->vel.Y = MulScale(p->vel.Y, gs.playerfriction - 0x1400, 16);
}
else
{
p->vel.X = MulScale(p->vel.X, gs.playerfriction, 16);
p->posyv = MulScale(p->posyv, gs.playerfriction, 16);
p->vel.Y = MulScale(p->vel.Y, gs.playerfriction, 16);
}
}
@ -3730,7 +3730,7 @@ void processinput_r(int snum)
else
{
p->vel.X = MulScale(p->vel.X, gs.playerfriction, 16);
p->posyv = MulScale(p->posyv, gs.playerfriction, 16);
p->vel.Y = MulScale(p->vel.Y, gs.playerfriction, 16);
}
}
else
@ -3742,7 +3742,7 @@ void processinput_r(int snum)
if (p->on_ground)
{
p->vel.X = MulScale(p->vel.X, gs.playerfriction - 0x1800, 16);
p->posyv = MulScale(p->posyv, gs.playerfriction - 0x1800, 16);
p->vel.Y = MulScale(p->vel.Y, gs.playerfriction - 0x1800, 16);
}
}
else
@ -3751,19 +3751,19 @@ void processinput_r(int snum)
else
{
p->vel.X = MulScale(p->vel.X, gs.playerfriction - 0x1800, 16);
p->posyv = MulScale(p->posyv, gs.playerfriction - 0x1800, 16);
p->vel.Y = MulScale(p->vel.Y, gs.playerfriction - 0x1800, 16);
}
}
if (abs(p->vel.X) < 2048 && abs(p->posyv) < 2048)
p->vel.X = p->posyv = 0;
if (abs(p->vel.X) < 2048 && abs(p->vel.Y) < 2048)
p->vel.X = p->vel.Y = 0;
if (shrunk)
{
p->vel.X =
MulScale(p->vel.X, gs.playerfriction - (gs.playerfriction >> 1) + (gs.playerfriction >> 2), 16);
p->posyv =
MulScale(p->posyv, gs.playerfriction - (gs.playerfriction >> 1) + (gs.playerfriction >> 2), 16);
p->vel.Y =
MulScale(p->vel.Y, gs.playerfriction - (gs.playerfriction >> 1) + (gs.playerfriction >> 2), 16);
}
}
@ -3779,12 +3779,12 @@ HORIZONLY:
if (ud.clipping)
{
p->pos.X += p->vel.X >> 14;
p->pos.Y += p->posyv >> 14;
p->pos.Y += p->vel.Y >> 14;
updatesector(p->pos.X, p->pos.Y, &p->cursector);
ChangeActorSect(pact, p->cursector);
}
else
clipmove(p->pos, &p->cursector, p->vel.X, p->posyv, 164, (4 << 8), i, CLIPMASK0, clip);
clipmove(p->pos, &p->cursector, p->vel.X, p->vel.Y, 164, (4 << 8), i, CLIPMASK0, clip);
if (p->jetpack_on == 0 && psectlotag != 2 && psectlotag != 1 && shrunk)
p->pos.Z += 32 << 8;
@ -4039,7 +4039,7 @@ void OnMotorcycle(struct player_struct *p, DDukeActor* motosprite)
p->curr_weapon = MOTORCYCLE_WEAPON;
p->gotweapon[MOTORCYCLE_WEAPON] = true;
p->vel.X = 0;
p->posyv = 0;
p->vel.Y = 0;
p->horizon.horiz = q16horiz(0);
}
if (!S_CheckActorSoundPlaying(p->GetActor(),186))
@ -4080,9 +4080,9 @@ void OffMotorcycle(struct player_struct *p)
p->VBumpNow = 0;
p->TurbCount = 0;
p->vel.X = 0;
p->posyv = 0;
p->vel.Y = 0;
p->vel.X -= p->angle.ang.bcos(7);
p->posyv -= p->angle.ang.bsin(7);
p->vel.Y -= p->angle.ang.bsin(7);
p->moto_underwater = 0;
auto spawned = spawn(p->GetActor(), EMPTYBIKE);
if (spawned)
@ -4119,7 +4119,7 @@ void OnBoat(struct player_struct *p, DDukeActor* boat)
p->curr_weapon = BOAT_WEAPON;
p->gotweapon[BOAT_WEAPON] = true;
p->vel.X = 0;
p->posyv = 0;
p->vel.Y = 0;
p->horizon.horiz = q16horiz(0);
}
}
@ -4147,9 +4147,9 @@ void OffBoat(struct player_struct *p)
p->VBumpNow = 0;
p->TurbCount = 0;
p->vel.X = 0;
p->posyv = 0;
p->vel.Y = 0;
p->vel.X -= p->angle.ang.bcos(7);
p->posyv -= p->angle.ang.bsin(7);
p->vel.Y -= p->angle.ang.bsin(7);
p->moto_underwater = 0;
auto spawned = spawn(p->GetActor(), EMPTYBOAT);
if (spawned)

View file

@ -149,7 +149,7 @@ void resetplayerstats(int snum)
p->jumping_counter = 0;
p->hard_landing = 0;
p->vel.X = 0; //!!
p->posyv = 0;
p->vel.Y = 0;
p->poszv = 0;
p->fric.X = 0;
p->fric.Y = 0;

View file

@ -126,7 +126,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, player_struct& w,
("bobposy", w.bobposy)
("pyoff", w.pyoff)
("posxv", w.vel.X)
("posyv", w.posyv)
("posyv", w.vel.Y)
("poszv", w.poszv)
("last_pissed_time", w.last_pissed_time)
("truefz", w.truefz)

View file

@ -928,7 +928,7 @@ void checkplayerhurt_d(struct player_struct* p, const Collision& coll)
SetPlayerPal(p, PalEntry(32, 32, 0, 0));
p->vel.X = -p->angle.ang.bcos(8);
p->posyv = -p->angle.ang.bsin(8);
p->vel.Y = -p->angle.ang.bsin(8);
S_PlayActorSound(DUKE_LONGTERM_PAIN, p->GetActor());
fi.checkhitwall(p->GetActor(), wal,

View file

@ -205,7 +205,7 @@ struct player_struct
int exitx, exity, loogiex[64], loogiey[64], numloogs, loogcnt;
int invdisptime;
int bobposx, bobposy, pyoff, opyoff;
int posyv, poszv, last_pissed_time, truefz, truecz;
int poszv, last_pissed_time, truefz, truecz;
int player_par, visibility;
int bobcounter;
int randomflamex, crack_time;

View file

@ -153,7 +153,7 @@ struct DukePlayer
native int exitx, exity, loogiex[64], loogiey[64], numloogs, loogcnt;
native int invdisptime;
native int bobposx, bobposy, pyoff, opyoff;
native int posyv, poszv, last_pissed_time, truefz, truecz;
native int poszv, last_pissed_time, truefz, truecz;
native int player_par, visibility;
native int bobcounter;
native int randomflamex, crack_time;