mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-09-01 17:29:52 -04:00
Replace individual x/y/z copies with struct copies where possible
This commit is contained in:
+21
-63
@@ -1221,9 +1221,7 @@ Gfx *bgRenderRoomXrayPass(Gfx *gdl, s32 roomnum, struct roomblock *block, bool r
|
||||
struct coord sp28;
|
||||
f32 sum;
|
||||
|
||||
sp34.x = coords[1].x;
|
||||
sp34.y = coords[1].y;
|
||||
sp34.z = coords[1].z;
|
||||
sp34 = coords[1];
|
||||
|
||||
sp28.x = coords[0].x - player->cam_pos.x;
|
||||
sp28.y = coords[0].y - player->cam_pos.y;
|
||||
@@ -2439,9 +2437,7 @@ void func0f15b3e4(s32 portalnum, struct coord *a, struct coord *b, struct coord
|
||||
struct portalvertices *pvertices;
|
||||
pvertices = (struct portalvertices *)((u32)g_BgPortals + g_BgPortals[portalnum].verticesoffset);
|
||||
|
||||
a->x = pvertices->vertices[0].x;
|
||||
a->y = pvertices->vertices[0].y;
|
||||
a->z = pvertices->vertices[0].z;
|
||||
*a = pvertices->vertices[0];
|
||||
|
||||
b->x = pvertices->vertices[1].x - pvertices->vertices[0].x;
|
||||
b->y = pvertices->vertices[1].y - pvertices->vertices[0].y;
|
||||
@@ -3205,9 +3201,7 @@ void bgBuildTables(s32 stagenum)
|
||||
}
|
||||
|
||||
tmp = &var800a4ccc[i];
|
||||
tmp->coord.x = tmp2.coord.x;
|
||||
tmp->coord.y = tmp2.coord.y;
|
||||
tmp->coord.z = tmp2.coord.z;
|
||||
tmp->coord = tmp2.coord;
|
||||
tmp->min = tmp2.min;
|
||||
tmp->max = tmp2.max;
|
||||
}
|
||||
@@ -3652,9 +3646,7 @@ bool func0f15d08c(struct coord *a, struct coord *b)
|
||||
{
|
||||
Mtxf *matrix = camGetWorldToScreenMtxf();
|
||||
|
||||
b->x = a->x;
|
||||
b->y = a->y;
|
||||
b->z = a->z;
|
||||
*b = *a;
|
||||
|
||||
mtx4TransformVecInPlace(matrix, b);
|
||||
cam0f0b4d68(b, b->f);
|
||||
@@ -6291,12 +6283,8 @@ bool bgTestHitOnObj(struct coord *arg0, struct coord *arg1, struct coord *arg2,
|
||||
|
||||
lowestsqdist = sqdist;
|
||||
|
||||
hitthing->unk00.x = sp8c.x;
|
||||
hitthing->unk00.y = sp8c.y;
|
||||
hitthing->unk00.z = sp8c.z;
|
||||
hitthing->unk0c.x = sp80.x;
|
||||
hitthing->unk0c.y = sp80.y;
|
||||
hitthing->unk0c.z = sp80.z;
|
||||
hitthing->unk00 = sp8c;
|
||||
hitthing->unk0c = sp80;
|
||||
hitthing->unk18 = &vtx[points[0]];
|
||||
hitthing->unk1c = &vtx[points[1]];
|
||||
hitthing->unk20 = &vtx[points[2]];
|
||||
@@ -6569,12 +6557,8 @@ bool bgTestHitOnChr(struct model *model, struct coord *arg1, struct coord *arg2,
|
||||
|
||||
*sqdistptr = sqdist;
|
||||
|
||||
hitthing->unk00.x = sp84.x;
|
||||
hitthing->unk00.y = sp84.y;
|
||||
hitthing->unk00.z = sp84.z;
|
||||
hitthing->unk0c.x = sp78.x;
|
||||
hitthing->unk0c.y = sp78.y;
|
||||
hitthing->unk0c.z = sp78.z;
|
||||
hitthing->unk00 = sp84;
|
||||
hitthing->unk0c = sp78;
|
||||
hitthing->unk18 = &vtx[points[0]];
|
||||
hitthing->unk1c = &vtx[points[1]];
|
||||
hitthing->unk20 = &vtx[points[2]];
|
||||
@@ -6793,12 +6777,8 @@ bool bgTestHitInVtxBatch(struct coord *arg0, struct coord *arg1, struct coord *a
|
||||
if (hit) {
|
||||
lowestsqdist = sqdist;
|
||||
|
||||
hitthing->unk00.x = spb0.x;
|
||||
hitthing->unk00.y = spb0.y;
|
||||
hitthing->unk00.z = spb0.z;
|
||||
hitthing->unk0c.x = spa4.x;
|
||||
hitthing->unk0c.y = spa4.y;
|
||||
hitthing->unk0c.z = spa4.z;
|
||||
hitthing->unk00 = spb0;
|
||||
hitthing->unk0c = spa4;
|
||||
hitthing->unk18 = &vtx[points[0]];
|
||||
hitthing->unk1c = &vtx[points[1]];
|
||||
hitthing->unk20 = &vtx[points[2]];
|
||||
@@ -6941,13 +6921,9 @@ bool bgTestHitInRoom(struct coord *frompos, struct coord *topos, s32 roomnum, st
|
||||
|
||||
count = 0;
|
||||
|
||||
spb8.x = frompos->x;
|
||||
spb8.y = frompos->y;
|
||||
spb8.z = frompos->z;
|
||||
spb8 = *frompos;
|
||||
|
||||
spac.x = topos->x;
|
||||
spac.y = topos->y;
|
||||
spac.z = topos->z;
|
||||
spac = *topos;
|
||||
|
||||
spa0.x = spac.x - spb8.x;
|
||||
spa0.y = spac.y - spb8.y;
|
||||
@@ -7087,12 +7063,8 @@ bool bgTestHitInRoom(struct coord *frompos, struct coord *topos, s32 roomnum, st
|
||||
f20 += f0 * f0;
|
||||
|
||||
if (f20 < spc8) {
|
||||
hitthing->unk00.x = sp60.unk00.x;
|
||||
hitthing->unk00.y = sp60.unk00.y;
|
||||
hitthing->unk00.z = sp60.unk00.z;
|
||||
hitthing->unk0c.x = sp60.unk0c.x;
|
||||
hitthing->unk0c.y = sp60.unk0c.y;
|
||||
hitthing->unk0c.z = sp60.unk0c.z;
|
||||
hitthing->unk00 = sp60.unk00;
|
||||
hitthing->unk0c = sp60.unk0c;
|
||||
hitthing->unk18 = sp60.unk18;
|
||||
hitthing->unk1c = sp60.unk1c;
|
||||
hitthing->unk20 = sp60.unk20;
|
||||
@@ -7123,9 +7095,7 @@ bool roomIsLoaded(s32 room)
|
||||
bool roomContainsCoord(struct coord *pos, s16 roomnum)
|
||||
{
|
||||
struct coord copy;
|
||||
copy.x = pos->x;
|
||||
copy.y = pos->y;
|
||||
copy.z = pos->z;
|
||||
copy = *pos;
|
||||
|
||||
return copy.f[0] >= g_Rooms[roomnum].bbmin[0]
|
||||
&& copy.f[0] <= g_Rooms[roomnum].bbmax[0]
|
||||
@@ -7308,9 +7278,7 @@ void bgFindRoomsByPos(struct coord *posarg, s16 *inrooms, s16 *aboverooms, s32 m
|
||||
s32 i;
|
||||
s32 j;
|
||||
|
||||
pos.x = posarg->x;
|
||||
pos.y = posarg->y;
|
||||
pos.z = posarg->z;
|
||||
pos = *posarg;
|
||||
|
||||
// Try rooms which have portals
|
||||
for (i = 1; i < g_Vars.roomcount; i++) {
|
||||
@@ -8750,18 +8718,12 @@ void func0f164ab8(s32 portalnum)
|
||||
roomnum1 = g_BgPortals[portalnum].roomnum1;
|
||||
roomnum2 = g_BgPortals[portalnum].roomnum2;
|
||||
|
||||
room1centre.x = g_Rooms[roomnum1].centre.x;
|
||||
room1centre.y = g_Rooms[roomnum1].centre.y;
|
||||
room1centre.z = g_Rooms[roomnum1].centre.z;
|
||||
room1centre = g_Rooms[roomnum1].centre;
|
||||
|
||||
room2centre.x = g_Rooms[roomnum2].centre.x;
|
||||
room2centre.y = g_Rooms[roomnum2].centre.y;
|
||||
room2centre.z = g_Rooms[roomnum2].centre.z;
|
||||
room2centre = g_Rooms[roomnum2].centre;
|
||||
|
||||
ptr = &var800a4ccc[portalnum];
|
||||
sp28.coord.x = ptr->coord.x;
|
||||
sp28.coord.y = ptr->coord.y;
|
||||
sp28.coord.z = ptr->coord.z;
|
||||
sp28.coord = ptr->coord;
|
||||
sp28.min = ptr->min;
|
||||
sp28.max = ptr->max;
|
||||
|
||||
@@ -8952,13 +8914,9 @@ void bgFindEnteredRooms(struct coord *bbmin, struct coord *bbmax, s16 *rooms, s3
|
||||
struct coord portalbbmin;
|
||||
struct coord portalbbmax;
|
||||
|
||||
propbbmin.x = bbmin->x;
|
||||
propbbmin.y = bbmin->y;
|
||||
propbbmin.z = bbmin->z;
|
||||
propbbmin = *bbmin;
|
||||
|
||||
propbbmax.x = bbmax->x;
|
||||
propbbmax.y = bbmax->y;
|
||||
propbbmax.z = bbmax->z;
|
||||
propbbmax = *bbmax;
|
||||
|
||||
i = 0;
|
||||
|
||||
|
||||
+6
-18
@@ -40,9 +40,7 @@ void bbikeInit(void)
|
||||
|
||||
g_Vars.currentplayer->bondentert = 0;
|
||||
g_Vars.currentplayer->bondentert2 = 1;
|
||||
g_Vars.currentplayer->bondenterpos.x = g_Vars.currentplayer->prop->pos.x;
|
||||
g_Vars.currentplayer->bondenterpos.y = g_Vars.currentplayer->prop->pos.y;
|
||||
g_Vars.currentplayer->bondenterpos.z = g_Vars.currentplayer->prop->pos.z;
|
||||
g_Vars.currentplayer->bondenterpos = g_Vars.currentplayer->prop->pos;
|
||||
|
||||
mtx3ToMtx4(hoverbike->base.realrot, &matrix);
|
||||
mtx4SetTranslation(&hoverbike->base.prop->pos, &matrix);
|
||||
@@ -153,9 +151,7 @@ void bbikeTryDismountAngle(f32 relativeangle, f32 distance)
|
||||
if (result == CDRESULT_NOCOLLISION) {
|
||||
g_Vars.currentplayer->walkinitmove = true;
|
||||
|
||||
g_Vars.currentplayer->walkinitpos.x = pos.x;
|
||||
g_Vars.currentplayer->walkinitpos.y = pos.y;
|
||||
g_Vars.currentplayer->walkinitpos.z = pos.z;
|
||||
g_Vars.currentplayer->walkinitpos = pos;
|
||||
|
||||
g_Vars.currentplayer->moveinitspeed.x = bike->speed[0];
|
||||
g_Vars.currentplayer->moveinitspeed.y = 0;
|
||||
@@ -315,9 +311,7 @@ void bbike0f0d2b40(struct defaultobj *bike, struct coord *arg1, f32 arg2, struct
|
||||
|
||||
cdGetEdge(&sp78, &sp6c, 333, "bondbike.c");
|
||||
|
||||
sp60.x = bike->prop->pos.x;
|
||||
sp60.y = bike->prop->pos.y;
|
||||
sp60.z = bike->prop->pos.z;
|
||||
sp60 = bike->prop->pos;
|
||||
|
||||
sp54.x = obstacle->prop->pos.x - bike->prop->pos.x;
|
||||
sp54.y = obstacle->prop->pos.y - bike->prop->pos.y;
|
||||
@@ -383,9 +377,7 @@ s32 bbikeCalculateNewPosition(struct coord *vel, f32 angledelta)
|
||||
f32 radius;
|
||||
f32 halfradius;
|
||||
|
||||
dstpos.x = g_Vars.currentplayer->hoverbike->pos.x;
|
||||
dstpos.y = g_Vars.currentplayer->hoverbike->pos.y;
|
||||
dstpos.z = g_Vars.currentplayer->hoverbike->pos.z;
|
||||
dstpos = g_Vars.currentplayer->hoverbike->pos;
|
||||
|
||||
if (vel->x || vel->y || vel->z) {
|
||||
propSetPerimEnabled(g_Vars.currentplayer->prop, false);
|
||||
@@ -559,9 +551,7 @@ void bbikeUpdateVertical(struct coord *pos)
|
||||
|
||||
g_Vars.currentplayer->vv_theta = (M_BADTAU - angle) * 360.0f / M_BADTAU;
|
||||
|
||||
g_Vars.currentplayer->prop->pos.x = pos->x;
|
||||
g_Vars.currentplayer->prop->pos.y = pos->y;
|
||||
g_Vars.currentplayer->prop->pos.z = pos->z;
|
||||
g_Vars.currentplayer->prop->pos = *pos;
|
||||
|
||||
ground = cdFindGroundInfoAtCyl(&g_Vars.currentplayer->prop->pos,
|
||||
g_Vars.currentplayer->bond2.radius,
|
||||
@@ -832,9 +822,7 @@ void bbikeTick(void)
|
||||
static f32 var80070f04 = 0;
|
||||
|
||||
if (g_Vars.lvupdate240 > 0) {
|
||||
g_Vars.currentplayer->bondprevpos.x = g_Vars.currentplayer->prop->pos.x;
|
||||
g_Vars.currentplayer->bondprevpos.y = g_Vars.currentplayer->prop->pos.y;
|
||||
g_Vars.currentplayer->bondprevpos.z = g_Vars.currentplayer->prop->pos.z;
|
||||
g_Vars.currentplayer->bondprevpos = g_Vars.currentplayer->prop->pos;
|
||||
|
||||
g_Vars.currentplayer->bondbreathing -= (0.75f * g_Vars.lvupdate60freal) / 2700.0f;
|
||||
|
||||
|
||||
@@ -201,9 +201,7 @@ s32 eyespyCalculateNewPosition(struct coord *vel)
|
||||
|
||||
if (result == CDRESULT_NOCOLLISION) {
|
||||
// Apply the destination
|
||||
eyespyprop->pos.x = dstpos.x;
|
||||
eyespyprop->pos.y = dstpos.y;
|
||||
eyespyprop->pos.z = dstpos.z;
|
||||
eyespyprop->pos = dstpos;
|
||||
|
||||
propDeregisterRooms(eyespyprop);
|
||||
|
||||
@@ -563,9 +561,7 @@ bool eyespyTryLaunch(void)
|
||||
insafe = stageGetIndex(g_Vars.stagenum) == STAGEINDEX_G5BUILDING
|
||||
&& g_Vars.currentplayer->prop->rooms[0] == 0x53;
|
||||
|
||||
playerpos.x = g_Vars.currentplayer->prop->pos.x;
|
||||
playerpos.y = g_Vars.currentplayer->prop->pos.y;
|
||||
playerpos.z = g_Vars.currentplayer->prop->pos.z;
|
||||
playerpos = g_Vars.currentplayer->prop->pos;
|
||||
|
||||
chr->soundtimer = TICKS(10);
|
||||
|
||||
@@ -867,9 +863,7 @@ void eyespyProcessInput(bool allowbuttons)
|
||||
g_Vars.currentplayer->eyespy->startuptimer60 = TICKS(50);
|
||||
}
|
||||
|
||||
chr->prevpos.x = g_Vars.currentplayer->eyespy->prop->pos.x;
|
||||
chr->prevpos.y = g_Vars.currentplayer->eyespy->prop->pos.y;
|
||||
chr->prevpos.z = g_Vars.currentplayer->eyespy->prop->pos.z;
|
||||
chr->prevpos = g_Vars.currentplayer->eyespy->prop->pos;
|
||||
|
||||
roomsCopy(g_Vars.currentplayer->eyespy->prop->rooms, prevrooms);
|
||||
|
||||
|
||||
+9
-27
@@ -36,9 +36,7 @@ void bgrabInit(void)
|
||||
g_Vars.currentplayer->bondmovemode = MOVEMODE_GRAB;
|
||||
|
||||
g_Vars.currentplayer->bondgrabthetaspeedsum = 0;
|
||||
g_Vars.currentplayer->grabbedprevpos.x = prop->pos.x;
|
||||
g_Vars.currentplayer->grabbedprevpos.y = prop->pos.y;
|
||||
g_Vars.currentplayer->grabbedprevpos.z = prop->pos.z;
|
||||
g_Vars.currentplayer->grabbedprevpos = prop->pos;
|
||||
g_Vars.currentplayer->grabbedrotoffset = 0;
|
||||
g_Vars.currentplayer->grabbedforcez = 0;
|
||||
g_Vars.currentplayer->grabbedposoffset.x = prop->pos.x - g_Vars.currentplayer->prop->pos.x;
|
||||
@@ -227,9 +225,7 @@ void bgrab0f0ccbf0(struct coord *delta, f32 angle, struct defaultobj *obj)
|
||||
sp44.y -= sp50.y;
|
||||
sp44.z -= sp50.z;
|
||||
} else {
|
||||
sp50.x = var8009de70->pos.x;
|
||||
sp50.y = var8009de70->pos.y;
|
||||
sp50.z = var8009de70->pos.z;
|
||||
sp50 = var8009de70->pos;
|
||||
|
||||
sp44.x = obj->prop->pos.x - var8009de70->pos.x;
|
||||
sp44.y = obj->prop->pos.y - var8009de70->pos.y;
|
||||
@@ -340,9 +336,7 @@ s32 bgrabCalculateNewPosition(struct coord *delta, f32 angle, bool arg2)
|
||||
propSetPerimEnabled(g_Vars.currentplayer->prop, false);
|
||||
propSetPerimEnabled(g_Vars.currentplayer->grabbedprop, false);
|
||||
|
||||
pos.x = g_Vars.currentplayer->prop->pos.x;
|
||||
pos.y = g_Vars.currentplayer->prop->pos.y;
|
||||
pos.z = g_Vars.currentplayer->prop->pos.z;
|
||||
pos = g_Vars.currentplayer->prop->pos;
|
||||
|
||||
if (delta->f[0] != 0.0f || delta->f[1] != 0.0f || delta->f[2] != 0.0f) {
|
||||
pos.x += delta->x;
|
||||
@@ -431,9 +425,7 @@ s32 bgrabCalculateNewPosition(struct coord *delta, f32 angle, bool arg2)
|
||||
posextra.f[2] = g_Vars.currentplayer->grabbedposextra.f[2];
|
||||
}
|
||||
|
||||
sp7c.x = delta->x;
|
||||
sp7c.y = delta->y;
|
||||
sp7c.z = delta->z;
|
||||
sp7c = *delta;
|
||||
|
||||
if (obj->type == OBJTYPE_HOVERPROP) {
|
||||
struct hoverpropobj *tmp = (struct hoverpropobj *)g_Vars.currentplayer->grabbedprop->obj;
|
||||
@@ -513,9 +505,7 @@ s32 bgrabCalculateNewPosition(struct coord *delta, f32 angle, bool arg2)
|
||||
|
||||
g_Vars.currentplayer->vv_theta = theta;
|
||||
|
||||
g_Vars.currentplayer->prop->pos.x = pos.x;
|
||||
g_Vars.currentplayer->prop->pos.y = pos.y;
|
||||
g_Vars.currentplayer->prop->pos.z = pos.z;
|
||||
g_Vars.currentplayer->prop->pos = pos;
|
||||
|
||||
if (ismoving) {
|
||||
propDeregisterRooms(g_Vars.currentplayer->prop);
|
||||
@@ -524,13 +514,9 @@ s32 bgrabCalculateNewPosition(struct coord *delta, f32 angle, bool arg2)
|
||||
|
||||
if (g_Vars.currentplayer->grabbeddoextra) {
|
||||
g_Vars.currentplayer->grabbedrotextra = rotextra;
|
||||
g_Vars.currentplayer->grabbedposextra.x = posextra.x;
|
||||
g_Vars.currentplayer->grabbedposextra.y = posextra.y;
|
||||
g_Vars.currentplayer->grabbedposextra.z = posextra.z;
|
||||
g_Vars.currentplayer->grabbedposextra = posextra;
|
||||
g_Vars.currentplayer->grabbedrotextrasum = rotextrasum;
|
||||
g_Vars.currentplayer->grabbedposextrasum.x = posextrasum.x;
|
||||
g_Vars.currentplayer->grabbedposextrasum.y = posextrasum.y;
|
||||
g_Vars.currentplayer->grabbedposextrasum.z = posextrasum.z;
|
||||
g_Vars.currentplayer->grabbedposextrasum = posextrasum;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -791,15 +777,11 @@ void bgrab0f0ce0bc(struct coord *arg0)
|
||||
|
||||
void bgrabUpdatePrevPos(void)
|
||||
{
|
||||
g_Vars.currentplayer->bondprevpos.x = g_Vars.currentplayer->prop->pos.x;
|
||||
g_Vars.currentplayer->bondprevpos.y = g_Vars.currentplayer->prop->pos.y;
|
||||
g_Vars.currentplayer->bondprevpos.z = g_Vars.currentplayer->prop->pos.z;
|
||||
g_Vars.currentplayer->bondprevpos = g_Vars.currentplayer->prop->pos;
|
||||
|
||||
g_Vars.currentplayer->bondprevtheta = g_Vars.currentplayer->vv_theta;
|
||||
|
||||
g_Vars.currentplayer->grabbedprevpos.x = g_Vars.currentplayer->grabbedprop->pos.x;
|
||||
g_Vars.currentplayer->grabbedprevpos.y = g_Vars.currentplayer->grabbedprop->pos.y;
|
||||
g_Vars.currentplayer->grabbedprevpos.z = g_Vars.currentplayer->grabbedprop->pos.z;
|
||||
g_Vars.currentplayer->grabbedprevpos = g_Vars.currentplayer->grabbedprop->pos;
|
||||
}
|
||||
|
||||
void bgrab0f0ce178(void)
|
||||
|
||||
+25
-75
@@ -2203,9 +2203,7 @@ bool bgun0f09aba4(struct hand *hand, struct handweaponinfo *info, s32 handnum, s
|
||||
hand->posend.y = 0;
|
||||
hand->posend.z = 0;
|
||||
|
||||
hand->posstart.x = hand->posoffset.x;
|
||||
hand->posstart.y = hand->posoffset.y;
|
||||
hand->posstart.z = hand->posoffset.z;
|
||||
hand->posstart = hand->posoffset;
|
||||
}
|
||||
|
||||
if (hand->stateflags & HANDSTATEFLAG_00000040) {
|
||||
@@ -2235,9 +2233,7 @@ bool bgun0f09aba4(struct hand *hand, struct handweaponinfo *info, s32 handnum, s
|
||||
if ((hand->stateflags & HANDSTATEFLAG_00000080) == 0) {
|
||||
hand->stateflags |= HANDSTATEFLAG_00000080;
|
||||
hand->rotxstart = hand->rotxoffset;
|
||||
hand->posstart.x = hand->posoffset.x;
|
||||
hand->posstart.y = hand->posoffset.y;
|
||||
hand->posstart.z = hand->posoffset.z;
|
||||
hand->posstart = hand->posoffset;
|
||||
}
|
||||
|
||||
hand->rotxend = M_BADTAU - (recoilangle * M_BADTAU) / 360.0f;
|
||||
@@ -4375,9 +4371,7 @@ void bgun0f09ebcc(struct defaultobj *obj, struct coord *coord, s16 *rooms, Mtxf
|
||||
projectileSetSticky(objprop);
|
||||
mtx4Copy(matrix2, (Mtxf *)&obj->projectile->mtx);
|
||||
|
||||
obj->projectile->speed.x = velocity->x;
|
||||
obj->projectile->speed.y = velocity->y;
|
||||
obj->projectile->speed.z = velocity->z;
|
||||
obj->projectile->speed = *velocity;
|
||||
obj->projectile->obj = obj;
|
||||
obj->projectile->unk0d8 = g_Vars.lvframenum;
|
||||
}
|
||||
@@ -4393,9 +4387,7 @@ void bgun0f09ed2c(struct defaultobj *obj, struct coord *newpos, Mtxf *arg2, stru
|
||||
if (objprop) {
|
||||
struct prop *playerprop = g_Vars.currentplayer->prop;
|
||||
|
||||
pos.x = playerprop->pos.x;
|
||||
pos.y = playerprop->pos.y;
|
||||
pos.z = playerprop->pos.z;
|
||||
pos = playerprop->pos;
|
||||
|
||||
roomsCopy(playerprop->rooms, rooms);
|
||||
|
||||
@@ -4404,9 +4396,7 @@ void bgun0f09ed2c(struct defaultobj *obj, struct coord *newpos, Mtxf *arg2, stru
|
||||
if (obj->hidden & OBJHFLAG_PROJECTILE) {
|
||||
obj->projectile->flags |= PROJECTILEFLAG_LAUNCHING;
|
||||
|
||||
obj->projectile->nextsteppos.x = newpos->x;
|
||||
obj->projectile->nextsteppos.y = newpos->y;
|
||||
obj->projectile->nextsteppos.z = newpos->z;
|
||||
obj->projectile->nextsteppos = *newpos;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4543,9 +4533,7 @@ void bgunCreateThrownProjectile(s32 handnum, struct gset *gset)
|
||||
|
||||
hand = g_Vars.currentplayer->hands + handnum;
|
||||
|
||||
muzzlepos.x = g_Vars.currentplayer->hands[handnum].muzzlepos.x;
|
||||
muzzlepos.y = g_Vars.currentplayer->hands[handnum].muzzlepos.y;
|
||||
muzzlepos.z = g_Vars.currentplayer->hands[handnum].muzzlepos.z;
|
||||
muzzlepos = g_Vars.currentplayer->hands[handnum].muzzlepos;
|
||||
|
||||
mtx4LoadIdentity(&sp1f4);
|
||||
|
||||
@@ -4570,13 +4558,9 @@ void bgunCreateThrownProjectile(s32 handnum, struct gset *gset)
|
||||
playerSetPerimEnabled(playerprop, false);
|
||||
|
||||
if (cdTestLos11(&playerprop->pos, playerprop->rooms, &muzzlepos, spawnrooms, CDTYPE_ALL) != CDRESULT_COLLISION) {
|
||||
spawnpos.x = muzzlepos.x;
|
||||
spawnpos.y = muzzlepos.y;
|
||||
spawnpos.z = muzzlepos.z;
|
||||
spawnpos = muzzlepos;
|
||||
} else {
|
||||
spawnpos.x = playerprop->pos.x;
|
||||
spawnpos.y = playerprop->pos.y;
|
||||
spawnpos.z = playerprop->pos.z;
|
||||
spawnpos = playerprop->pos;
|
||||
|
||||
roomsCopy(playerprop->rooms, spawnrooms);
|
||||
}
|
||||
@@ -4596,9 +4580,7 @@ void bgunCreateThrownProjectile(s32 handnum, struct gset *gset)
|
||||
func0f061d54(0, 0, 0);
|
||||
|
||||
if (hand->hasdotinfo) {
|
||||
aimpos.x = hand->dotpos.x;
|
||||
aimpos.y = hand->dotpos.y;
|
||||
aimpos.z = hand->dotpos.z;
|
||||
aimpos = hand->dotpos;
|
||||
|
||||
chrCalculateTrajectory(&spawnpos, 21.666666f, &aimpos, &sp140);
|
||||
|
||||
@@ -4626,9 +4608,7 @@ void bgunCreateThrownProjectile(s32 handnum, struct gset *gset)
|
||||
sp1dc.y = -sp78.m[2][1];
|
||||
sp1dc.z = -sp78.m[2][2];
|
||||
} else {
|
||||
sp1dc.x = sp140.x;
|
||||
sp1dc.y = sp140.y;
|
||||
sp1dc.z = sp140.z;
|
||||
sp1dc = sp140;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4684,9 +4664,7 @@ void bgunCreateThrownProjectile(s32 handnum, struct gset *gset)
|
||||
|
||||
if (obj->hidden & OBJHFLAG_PROJECTILE) {
|
||||
obj->projectile->flags |= PROJECTILEFLAG_LAUNCHING;
|
||||
obj->projectile->nextsteppos.x = muzzlepos.x;
|
||||
obj->projectile->nextsteppos.y = muzzlepos.y;
|
||||
obj->projectile->nextsteppos.z = muzzlepos.z;
|
||||
obj->projectile->nextsteppos = muzzlepos;
|
||||
|
||||
if (gset->weaponnum == WEAPON_GRENADE && gset->weaponfunc == FUNC_SECONDARY) {
|
||||
obj->projectile->unk08c = 1.0f;
|
||||
@@ -4823,9 +4801,7 @@ void bgunCreateFiredProjectile(s32 handnum)
|
||||
bgunCalculatePlayerShotSpread(&sp204, &sp1f8, handnum, true);
|
||||
mtx4RotateVecInPlace(camGetProjectionMtxF(), &sp1f8);
|
||||
|
||||
spawnpos.x = hand->muzzlepos.x;
|
||||
spawnpos.y = hand->muzzlepos.y;
|
||||
spawnpos.z = hand->muzzlepos.z;
|
||||
spawnpos = hand->muzzlepos;
|
||||
|
||||
if (hand->gset.weaponnum == WEAPON_SLAYER && hand->gset.weaponfunc == FUNC_SECONDARY) {
|
||||
spawnpos.x += 50.0f * sp1f8.x;
|
||||
@@ -4840,9 +4816,7 @@ void bgunCreateFiredProjectile(s32 handnum)
|
||||
func0f061d54(0, 0, 0);
|
||||
|
||||
if (hand->hasdotinfo) {
|
||||
aimpos.x = hand->dotpos.x;
|
||||
aimpos.y = hand->dotpos.y;
|
||||
aimpos.z = hand->dotpos.z;
|
||||
aimpos = hand->dotpos;
|
||||
|
||||
chrCalculateTrajectory(&spawnpos, sp25c, &aimpos, &sp1bc);
|
||||
|
||||
@@ -4869,9 +4843,7 @@ void bgunCreateFiredProjectile(s32 handnum)
|
||||
sp1f8.y = -spf4.m[2][1];
|
||||
sp1f8.z = -spf4.m[2][2];
|
||||
} else {
|
||||
sp1f8.x = sp1bc.x;
|
||||
sp1f8.y = sp1bc.y;
|
||||
sp1f8.z = sp1bc.z;
|
||||
sp1f8 = sp1bc;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5141,9 +5113,7 @@ void bgunSwivel(f32 screenx, f32 screeny, f32 crossdamp, f32 aimdamp)
|
||||
hand = &player->hands[h];
|
||||
|
||||
if (hand->hasdotinfo && !g_Vars.mplayerisrunning) {
|
||||
sp94.x = hand->dotpos.x;
|
||||
sp94.y = hand->dotpos.y;
|
||||
sp94.z = hand->dotpos.z;
|
||||
sp94 = hand->dotpos;
|
||||
|
||||
mtx4TransformVecInPlace(camGetWorldToScreenMtxf(), &sp94);
|
||||
|
||||
@@ -5409,13 +5379,9 @@ bool bgunGetLastShootInfo(struct coord *pos, struct coord *dir, s32 handnum)
|
||||
return false;
|
||||
}
|
||||
|
||||
pos->x = hand->lastshootpos.x;
|
||||
pos->y = hand->lastshootpos.y;
|
||||
pos->z = hand->lastshootpos.z;
|
||||
*pos = hand->lastshootpos;
|
||||
|
||||
dir->x = hand->lastshootdir.x;
|
||||
dir->y = hand->lastshootdir.y;
|
||||
dir->z = hand->lastshootdir.z;
|
||||
*dir = hand->lastshootdir;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -5426,13 +5392,9 @@ void bgunSetLastShootInfo(struct coord *pos, struct coord *dir, s32 handnum)
|
||||
|
||||
hand->lastdirvalid = true;
|
||||
|
||||
hand->lastshootpos.x = pos->x;
|
||||
hand->lastshootpos.y = pos->y;
|
||||
hand->lastshootpos.z = pos->z;
|
||||
hand->lastshootpos = *pos;
|
||||
|
||||
hand->lastshootdir.x = dir->x;
|
||||
hand->lastshootdir.y = dir->y;
|
||||
hand->lastshootdir.z = dir->z;
|
||||
hand->lastshootdir = *dir;
|
||||
}
|
||||
|
||||
s32 bgunGetShotsToTake(s32 handnum)
|
||||
@@ -6146,9 +6108,7 @@ void bgun0f0a24f0(struct coord *arg0, s32 handnum)
|
||||
b.y *= 1000;
|
||||
b.z *= 1000;
|
||||
|
||||
arg0->x = b.x;
|
||||
arg0->y = b.y;
|
||||
arg0->z = b.z;
|
||||
*arg0 = b;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -6834,9 +6794,7 @@ void bgunUpdateSmoke(struct hand *hand, s32 handnum, s32 weaponnum, struct weapo
|
||||
smokerooms[0] = g_Vars.currentplayer->cam_room;
|
||||
smokerooms[1] = -1;
|
||||
|
||||
smokepos.x = hand->muzzlepos.x;
|
||||
smokepos.y = hand->muzzlepos.y;
|
||||
smokepos.z = hand->muzzlepos.z;
|
||||
smokepos = hand->muzzlepos;
|
||||
|
||||
hand->gunsmokepoint = 0.0f;
|
||||
|
||||
@@ -6882,13 +6840,9 @@ void bgunUpdateLasersight(struct hand *hand, struct modelfiledata *modeldef, s32
|
||||
|
||||
mtx4RotateVecInPlace(&hand->cammtx, &beamfar);
|
||||
|
||||
sp48.x = beamfar.x;
|
||||
sp48.y = beamfar.y;
|
||||
sp48.z = beamfar.z;
|
||||
sp48 = beamfar;
|
||||
|
||||
sp3c.x = beamnear.x;
|
||||
sp3c.y = beamnear.y;
|
||||
sp3c.z = beamnear.z;
|
||||
sp3c = beamnear;
|
||||
|
||||
mtx4TransformVec(camGetWorldToScreenMtxf(), &sp3c, &sp54);
|
||||
mtx4RotateVec(camGetProjectionMtxF(), &sp48, &sp30);
|
||||
@@ -6933,13 +6887,9 @@ void bgunUpdateLasersight(struct hand *hand, struct modelfiledata *modeldef, s32
|
||||
lasersightSetBeam(handnum, 1, &beamnear, &beamfar);
|
||||
|
||||
if (handnum == HAND_RIGHT && hand->hasdotinfo && !busy) {
|
||||
dotpos.x = hand->dotpos.x;
|
||||
dotpos.y = hand->dotpos.y;
|
||||
dotpos.z = hand->dotpos.z;
|
||||
dotpos = hand->dotpos;
|
||||
|
||||
dotrot.x = hand->dotrot.x;
|
||||
dotrot.y = hand->dotrot.y;
|
||||
dotrot.z = hand->dotrot.z;
|
||||
dotrot = hand->dotrot;
|
||||
|
||||
lasersightSetDot(handnum, &dotpos, &dotrot);
|
||||
}
|
||||
|
||||
+2
-6
@@ -158,9 +158,7 @@ void bheadUpdate(f32 arg0, f32 arg1)
|
||||
sp80.unk10 = g_Vars.currentplayer->bondheadmatrices;
|
||||
model0001cebc(&sp80, &g_Vars.currentplayer->model);
|
||||
|
||||
g_Vars.currentplayer->headbodyoffset.x = g_Vars.currentplayer->standbodyoffset.x;
|
||||
g_Vars.currentplayer->headbodyoffset.y = g_Vars.currentplayer->standbodyoffset.y;
|
||||
g_Vars.currentplayer->headbodyoffset.z = g_Vars.currentplayer->standbodyoffset.z;
|
||||
g_Vars.currentplayer->headbodyoffset = g_Vars.currentplayer->standbodyoffset;
|
||||
|
||||
modelGetRootPosition(&g_Vars.currentplayer->model, &modelpos);
|
||||
|
||||
@@ -213,9 +211,7 @@ void bheadUpdate(f32 arg0, f32 arg1)
|
||||
bheadSetdamp(PAL ? 0.952f : 0.96f);
|
||||
}
|
||||
} else {
|
||||
g_Vars.currentplayer->headbodyoffset.x = g_Vars.currentplayer->standbodyoffset.x;
|
||||
g_Vars.currentplayer->headbodyoffset.y = g_Vars.currentplayer->standbodyoffset.y;
|
||||
g_Vars.currentplayer->headbodyoffset.z = g_Vars.currentplayer->standbodyoffset.z;
|
||||
g_Vars.currentplayer->headbodyoffset = g_Vars.currentplayer->standbodyoffset;
|
||||
|
||||
headpos.x = 0;
|
||||
headpos.y = g_Vars.currentplayer->standheight;
|
||||
|
||||
+2
-6
@@ -417,9 +417,7 @@ f32 bmoveCalculateLookahead(void)
|
||||
|
||||
playerGetBbox(g_Vars.currentplayer->prop, &radius, &ymax, &ymin);
|
||||
|
||||
sp100.x = g_Vars.currentplayer->bond2.unk00.x;
|
||||
sp100.y = g_Vars.currentplayer->bond2.unk00.y;
|
||||
sp100.z = g_Vars.currentplayer->bond2.unk00.z;
|
||||
sp100 = g_Vars.currentplayer->bond2.unk00;
|
||||
|
||||
spf0.x = g_Vars.currentplayer->prop->pos.x;
|
||||
spf0.y = g_Vars.currentplayer->prop->pos.y - 30;
|
||||
@@ -2018,9 +2016,7 @@ void bmove0f0cc19c(struct coord *arg)
|
||||
f32 min;
|
||||
f32 mult;
|
||||
|
||||
g_Vars.currentplayer->bond2.unk10.x = arg->x;
|
||||
g_Vars.currentplayer->bond2.unk10.y = arg->y;
|
||||
g_Vars.currentplayer->bond2.unk10.z = arg->z;
|
||||
g_Vars.currentplayer->bond2.unk10 = *arg;
|
||||
|
||||
if (g_Vars.currentplayer->isdead && g_Vars.currentplayer->bondleandown > 0) {
|
||||
g_Vars.currentplayer->bondleandown -= 0.25f;
|
||||
|
||||
+7
-21
@@ -102,9 +102,7 @@ void bwalkInit(void)
|
||||
g_Vars.currentplayer->bond2.unk28.x, g_Vars.currentplayer->bond2.unk28.y, g_Vars.currentplayer->bond2.unk28.z);
|
||||
g_Vars.currentplayer->walkinitt = 0;
|
||||
g_Vars.currentplayer->walkinitt2 = 0;
|
||||
g_Vars.currentplayer->walkinitstart.x = g_Vars.currentplayer->prop->pos.x;
|
||||
g_Vars.currentplayer->walkinitstart.y = g_Vars.currentplayer->prop->pos.y;
|
||||
g_Vars.currentplayer->walkinitstart.z = g_Vars.currentplayer->prop->pos.z;
|
||||
g_Vars.currentplayer->walkinitstart = g_Vars.currentplayer->prop->pos;
|
||||
|
||||
delta.x = g_Vars.currentplayer->walkinitpos.x - g_Vars.currentplayer->prop->pos.x;
|
||||
delta.y = 0;
|
||||
@@ -252,9 +250,7 @@ bool bwalkCalculateNewPosition(struct coord *vel, f32 rotateamount, bool apply,
|
||||
g_Vars.enableslopes = true;
|
||||
}
|
||||
|
||||
dstpos.x = g_Vars.currentplayer->prop->pos.x;
|
||||
dstpos.y = g_Vars.currentplayer->prop->pos.y;
|
||||
dstpos.z = g_Vars.currentplayer->prop->pos.z;
|
||||
dstpos = g_Vars.currentplayer->prop->pos;
|
||||
|
||||
if (vel->x || vel->y || vel->z) {
|
||||
if (g_Vars.currentplayer->tank) {
|
||||
@@ -336,9 +332,7 @@ bool bwalkCalculateNewPosition(struct coord *vel, f32 rotateamount, bool apply,
|
||||
|
||||
g_Vars.currentplayer->vv_theta = angle;
|
||||
|
||||
g_Vars.currentplayer->prop->pos.x = dstpos.x;
|
||||
g_Vars.currentplayer->prop->pos.y = dstpos.y;
|
||||
g_Vars.currentplayer->prop->pos.z = dstpos.z;
|
||||
g_Vars.currentplayer->prop->pos = dstpos;
|
||||
|
||||
if (copyrooms) {
|
||||
propDeregisterRooms(g_Vars.currentplayer->prop);
|
||||
@@ -436,9 +430,7 @@ bool bwalkCalculateNewPositionWithPush(struct coord *delta, f32 rotateamount, bo
|
||||
|
||||
chrCalculatePushPos(chr, &newpos, newrooms, false);
|
||||
|
||||
obstacle->pos.x = newpos.x;
|
||||
obstacle->pos.y = newpos.y;
|
||||
obstacle->pos.z = newpos.z;
|
||||
obstacle->pos = newpos;
|
||||
|
||||
propDeregisterRooms(obstacle);
|
||||
roomsCopy(newrooms, obstacle->rooms);
|
||||
@@ -771,9 +763,7 @@ void bwalkUpdateVertical(void)
|
||||
rooms, GEOFLAG_LADDER | GEOFLAG_LADDER_PLAYERONLY, &g_Vars.currentplayer->laddernormal);
|
||||
}
|
||||
|
||||
testpos.x = g_Vars.currentplayer->prop->pos.x;
|
||||
testpos.y = g_Vars.currentplayer->prop->pos.y;
|
||||
testpos.z = g_Vars.currentplayer->prop->pos.z;
|
||||
testpos = g_Vars.currentplayer->prop->pos;
|
||||
|
||||
if (g_Vars.currentplayer->inlift) {
|
||||
testpos.y -= g_Vars.currentplayer->crouchheight + g_Vars.currentplayer->crouchoffsetrealsmall;
|
||||
@@ -1124,9 +1114,7 @@ void bwalkUpdateVertical(void)
|
||||
|| newpos.z != g_Vars.currentplayer->prop->pos.z) {
|
||||
func0f065e74(&g_Vars.currentplayer->prop->pos, g_Vars.currentplayer->prop->rooms, &newpos, newrooms);
|
||||
|
||||
g_Vars.currentplayer->prop->pos.x = newpos.x;
|
||||
g_Vars.currentplayer->prop->pos.y = newpos.y;
|
||||
g_Vars.currentplayer->prop->pos.z = newpos.z;
|
||||
g_Vars.currentplayer->prop->pos = newpos;
|
||||
|
||||
propDeregisterRooms(g_Vars.currentplayer->prop);
|
||||
roomsCopy(newrooms, g_Vars.currentplayer->prop->rooms);
|
||||
@@ -1265,9 +1253,7 @@ void bwalk0f0c63bc(struct coord *arg0, u32 arg1, s32 types)
|
||||
|
||||
void bwalkUpdatePrevPos(void)
|
||||
{
|
||||
g_Vars.currentplayer->bondprevpos.x = g_Vars.currentplayer->prop->pos.x;
|
||||
g_Vars.currentplayer->bondprevpos.y = g_Vars.currentplayer->prop->pos.y;
|
||||
g_Vars.currentplayer->bondprevpos.z = g_Vars.currentplayer->prop->pos.z;
|
||||
g_Vars.currentplayer->bondprevpos = g_Vars.currentplayer->prop->pos;
|
||||
|
||||
roomsCopy(g_Vars.currentplayer->prop->rooms, g_Vars.currentplayer->bondprevrooms);
|
||||
}
|
||||
|
||||
+5
-15
@@ -1207,9 +1207,7 @@ void botApplyProtect(struct chrdata *chr, struct prop *prop)
|
||||
void botApplyDefend(struct chrdata *chr, struct coord *pos, s16 *room, f32 arg3)
|
||||
{
|
||||
chr->aibot->command = AIBOTCMD_DEFEND;
|
||||
chr->aibot->defendholdpos.x = pos->x;
|
||||
chr->aibot->defendholdpos.y = pos->y;
|
||||
chr->aibot->defendholdpos.z = pos->z;
|
||||
chr->aibot->defendholdpos = *pos;
|
||||
roomsCopy(room, chr->aibot->defendholdrooms);
|
||||
chr->aibot->unk098 = arg3;
|
||||
chr->aibot->forcemainloop = true;
|
||||
@@ -1218,9 +1216,7 @@ void botApplyDefend(struct chrdata *chr, struct coord *pos, s16 *room, f32 arg3)
|
||||
void botApplyHold(struct chrdata *chr, struct coord *pos, s16 *room, f32 arg3)
|
||||
{
|
||||
chr->aibot->command = AIBOTCMD_HOLD;
|
||||
chr->aibot->defendholdpos.x = pos->x;
|
||||
chr->aibot->defendholdpos.y = pos->y;
|
||||
chr->aibot->defendholdpos.z = pos->z;
|
||||
chr->aibot->defendholdpos = *pos;
|
||||
roomsCopy(room, chr->aibot->defendholdrooms);
|
||||
chr->aibot->unk098 = arg3;
|
||||
chr->aibot->forcemainloop = true;
|
||||
@@ -2759,9 +2755,7 @@ void botTickUnpaused(struct chrdata *chr)
|
||||
} else {
|
||||
// Token is not held - go to the pos to defend it
|
||||
newaction = MA_AIBOTGOTOPOS;
|
||||
aibot->gotopos.x = token->pos.x;
|
||||
aibot->gotopos.y = token->pos.y;
|
||||
aibot->gotopos.z = token->pos.z;
|
||||
aibot->gotopos = token->pos;
|
||||
roomsCopy(token->rooms, aibot->gotorooms);
|
||||
aibot->unk04c_00 = false;
|
||||
}
|
||||
@@ -2787,9 +2781,7 @@ void botTickUnpaused(struct chrdata *chr)
|
||||
|
||||
if (botroomFindPos(g_ScenarioData.koh.hillrooms[0], &posinhill, &angle, &padnuminhill, &covernuminhill)) {
|
||||
newaction = MA_AIBOTGOTOPOS;
|
||||
aibot->gotopos.x = posinhill.x;
|
||||
aibot->gotopos.y = posinhill.y;
|
||||
aibot->gotopos.z = posinhill.z;
|
||||
aibot->gotopos = posinhill;
|
||||
roomsCopy(g_ScenarioData.koh.hillrooms, aibot->gotorooms);
|
||||
aibot->unk04c_00 = (chr->prop->rooms[0] == g_ScenarioData.koh.hillrooms[0]) != 0;
|
||||
aibot->hillpadnum = padnuminhill;
|
||||
@@ -2809,9 +2801,7 @@ void botTickUnpaused(struct chrdata *chr)
|
||||
// Go to the hill if not there already
|
||||
if (botroomFindPos(g_ScenarioData.koh.hillrooms[0], &posinhill, &angle, &padnuminhill, &covernuminhill)) {
|
||||
newaction = MA_AIBOTGOTOPOS;
|
||||
aibot->gotopos.x = posinhill.x;
|
||||
aibot->gotopos.y = posinhill.y;
|
||||
aibot->gotopos.z = posinhill.z;
|
||||
aibot->gotopos = posinhill;
|
||||
roomsCopy(g_ScenarioData.koh.hillrooms, aibot->gotorooms);
|
||||
aibot->unk04c_00 = (chr->prop->rooms[0] == g_ScenarioData.koh.hillrooms[0]) != 0;
|
||||
aibot->hillpadnum = padnuminhill;
|
||||
|
||||
+1
-3
@@ -164,9 +164,7 @@ void botmgrAllocateBot(s32 chrnum, s32 aibotnum)
|
||||
aibot->command = AIBOTCMD_NORMAL;
|
||||
aibot->unk098 = 0.0f;
|
||||
|
||||
aibot->defendholdpos.x = pos.x;
|
||||
aibot->defendholdpos.y = pos.y;
|
||||
aibot->defendholdpos.z = pos.z;
|
||||
aibot->defendholdpos = pos;
|
||||
|
||||
aibot->weaponnum = WEAPON_UNARMED;
|
||||
|
||||
|
||||
+2
-6
@@ -138,9 +138,7 @@ bool botroomFindPos(s16 room, struct coord *pos, f32 *angleptr, s32 *padnumptr,
|
||||
if (i < covercount) {
|
||||
coverUnpack(covernums[i], &cover);
|
||||
|
||||
pos->x = cover.pos->x;
|
||||
pos->y = cover.pos->y;
|
||||
pos->z = cover.pos->z;
|
||||
*pos = *cover.pos;
|
||||
|
||||
*angleptr = atan2f(cover.look->z, cover.look->x);
|
||||
*padnumptr = -1;
|
||||
@@ -150,9 +148,7 @@ bool botroomFindPos(s16 room, struct coord *pos, f32 *angleptr, s32 *padnumptr,
|
||||
|
||||
pad = &g_Pads[padnums[i]];
|
||||
|
||||
pos->x = pad->pos.x;
|
||||
pos->y = pad->pos.y;
|
||||
pos->z = pad->pos.z;
|
||||
*pos = pad->pos;
|
||||
|
||||
*angleptr = atan2f(pad->look.z, pad->look.x);
|
||||
*padnumptr = padnums[i];
|
||||
|
||||
+4
-12
@@ -700,9 +700,7 @@ bool chr0f01f378(struct model *model, struct coord *arg1, struct coord *arg2, f3
|
||||
struct eyespy *eyespy = chrToEyespy(chr);
|
||||
|
||||
if (eyespy && eyespy->deployed) {
|
||||
arg2->x = chr->prop->pos.x;
|
||||
arg2->y = chr->prop->pos.y;
|
||||
arg2->z = chr->prop->pos.z;
|
||||
*arg2 = chr->prop->pos;
|
||||
}
|
||||
} else if (chr->actiontype == ACT_SKJUMP
|
||||
&& chr->act_skjump.state == SKJUMPSTATE_AIRBORNE
|
||||
@@ -828,9 +826,7 @@ bool chr0f01f378(struct model *model, struct coord *arg1, struct coord *arg2, f3
|
||||
&& (chr->prop->flags & PROPFLAG_ONANYSCREENPREVTICK) == 0) {
|
||||
chr->aibot->unk078 = 10;
|
||||
|
||||
arg2->x = prop->pos.x;
|
||||
arg2->y = prop->pos.y;
|
||||
arg2->z = prop->pos.z;
|
||||
*arg2 = prop->pos;
|
||||
|
||||
roomsCopy(prop->rooms, spfc);
|
||||
|
||||
@@ -942,9 +938,7 @@ bool chr0f01f378(struct model *model, struct coord *arg1, struct coord *arg2, f3
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
if (manground != chr->manground) {
|
||||
spd0.x = arg2->x;
|
||||
spd0.y = arg2->y;
|
||||
spd0.z = arg2->z;
|
||||
spd0 = *arg2;
|
||||
|
||||
roomsCopy(spfc, spc0);
|
||||
|
||||
@@ -1325,9 +1319,7 @@ struct prop *chr0f020b14(struct prop *prop, struct model *model,
|
||||
rwdata->chrinfo.ground = ground;
|
||||
}
|
||||
|
||||
chr->prevpos.x = prop->pos.x;
|
||||
chr->prevpos.y = prop->pos.y;
|
||||
chr->prevpos.z = prop->pos.z;
|
||||
chr->prevpos = prop->pos;
|
||||
|
||||
propCalculateShadeColour(prop, chr->nextcol, chr->floorcol);
|
||||
|
||||
|
||||
+63
-189
@@ -1568,13 +1568,9 @@ void func0f02e3dc(struct coord *a, struct coord *b,struct coord *c, struct coord
|
||||
dst->y = d->y * tmp + c->y;
|
||||
dst->z = d->z * tmp + c->z;
|
||||
} else if (d->x == 0 && d->z == 0) {
|
||||
dst->x = c->x;
|
||||
dst->y = c->y;
|
||||
dst->z = c->z;
|
||||
*dst = *c;
|
||||
} else {
|
||||
dst->x = a->x;
|
||||
dst->y = a->y;
|
||||
dst->z = a->z;
|
||||
*dst = *a;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2201,9 +2197,7 @@ void chrRunToPos(struct chrdata *chr, struct coord *pos)
|
||||
{
|
||||
chrStopFiring(chr);
|
||||
chr->actiontype = ACT_RUNPOS;
|
||||
chr->act_runpos.pos.x = pos->x;
|
||||
chr->act_runpos.pos.y = pos->y;
|
||||
chr->act_runpos.pos.z = pos->z;
|
||||
chr->act_runpos.pos = *pos;
|
||||
chr->sleep = 0;
|
||||
chr->act_runpos.neardist = 30;
|
||||
chr->act_runpos.turnspeed = 0;
|
||||
@@ -3633,9 +3627,7 @@ void chrYeetFromPos(struct chrdata *chr, struct coord *exppos, f32 force)
|
||||
dist.y *= speed;
|
||||
dist.z *= speed;
|
||||
|
||||
chr->fallspeed.x = dist.x;
|
||||
chr->fallspeed.y = dist.y;
|
||||
chr->fallspeed.z = dist.z;
|
||||
chr->fallspeed = dist;
|
||||
|
||||
if (latangle < faceangle) {
|
||||
angletoexplosion += M_BADTAU;
|
||||
@@ -5041,9 +5033,7 @@ void chrDamage(struct chrdata *chr, f32 damage, struct coord *vector, struct gse
|
||||
}
|
||||
|
||||
chr->actiontype = ACT_PREARGH;
|
||||
chr->act_preargh.dir.x = vector->x;
|
||||
chr->act_preargh.dir.y = vector->y;
|
||||
chr->act_preargh.dir.z = vector->z;
|
||||
chr->act_preargh.dir = *vector;
|
||||
chr->act_preargh.relshotdir = angle;
|
||||
chr->act_preargh.hitpart = hitpart;
|
||||
chr->act_preargh.aplayernum = aplayernum;
|
||||
@@ -5371,9 +5361,7 @@ void chrGoPosGetCurWaypointInfoWithFlags(struct chrdata *chr, struct coord *pos,
|
||||
if (waypoint) {
|
||||
pad = &g_Pads[waypoint->padnum];
|
||||
|
||||
pos->x = pad->pos.x;
|
||||
pos->y = pad->pos.y;
|
||||
pos->z = pad->pos.z;
|
||||
*pos = pad->pos;
|
||||
|
||||
rooms[0] = pad->room;
|
||||
rooms[1] = -1;
|
||||
@@ -5382,9 +5370,7 @@ void chrGoPosGetCurWaypointInfoWithFlags(struct chrdata *chr, struct coord *pos,
|
||||
*flags = pad->flags;
|
||||
}
|
||||
} else {
|
||||
pos->x = chr->act_gopos.endpos.x;
|
||||
pos->y = chr->act_gopos.endpos.y;
|
||||
pos->z = chr->act_gopos.endpos.z;
|
||||
*pos = chr->act_gopos.endpos;
|
||||
|
||||
rooms[0] = chr->act_gopos.endrooms[0];
|
||||
rooms[1] = -1;
|
||||
@@ -5493,9 +5479,7 @@ void chrGoPosInitExpensive(struct chrdata *chr)
|
||||
chr->act_gopos.waydata.mode = WAYMODE_INIT;
|
||||
chr->act_gopos.waydata.iter = 0;
|
||||
chr->act_gopos.waydata.gotaimpos = false;
|
||||
chr->act_gopos.waydata.aimpos.x = pos.x;
|
||||
chr->act_gopos.waydata.aimpos.y = pos.y;
|
||||
chr->act_gopos.waydata.aimpos.z = pos.z;
|
||||
chr->act_gopos.waydata.aimpos = pos;
|
||||
|
||||
chrGoPosClearRestartTtl(chr);
|
||||
}
|
||||
@@ -5609,9 +5593,7 @@ void chrPatrolGetCurWaypointInfoWithFlags(struct chrdata *chr, struct coord *pos
|
||||
|
||||
pad = &g_Pads[padnum];
|
||||
|
||||
pos->x = pad->pos.x;
|
||||
pos->y = pad->pos.y;
|
||||
pos->z = pad->pos.z;
|
||||
*pos = pad->pos;
|
||||
|
||||
rooms[0] = pad->room;
|
||||
rooms[1] = -1;
|
||||
@@ -5690,9 +5672,7 @@ void chrNavTickMagic(struct chrdata *chr, struct waydata *waydata, f32 speed, st
|
||||
|
||||
if (cdTestVolume(&spf4, chr->radius, sp118, CDTYPE_ALL, CHECKVERTICAL_YES, ymax - prop->pos.y, ymin - prop->pos.y) != CDRESULT_COLLISION) {
|
||||
// Reached end of segment with no collision
|
||||
prop->pos.x = spf4.x;
|
||||
prop->pos.y = spf4.y;
|
||||
prop->pos.z = spf4.z;
|
||||
prop->pos = spf4;
|
||||
|
||||
chr->ground = ground;
|
||||
chr->manground = ground;
|
||||
@@ -5797,9 +5777,7 @@ void chrCalculatePosition(struct chrdata *chr, struct coord *pos)
|
||||
pos->z = (pos->z - chr->prop->pos.z) * frac + chr->prop->pos.z;
|
||||
}
|
||||
} else {
|
||||
pos->x = chr->prop->pos.x;
|
||||
pos->y = chr->prop->pos.y;
|
||||
pos->z = chr->prop->pos.z;
|
||||
*pos = chr->prop->pos;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6117,17 +6095,13 @@ bool chrGoToRoomPos(struct chrdata *chr, struct coord *pos, s16 *room, u32 gopos
|
||||
if (isgopos && ismagic) {
|
||||
chrCalculatePosition(chr, &prevpos);
|
||||
} else {
|
||||
prevpos.x = prop->pos.x;
|
||||
prevpos.y = prop->pos.y;
|
||||
prevpos.z = prop->pos.z;
|
||||
prevpos = prop->pos;
|
||||
}
|
||||
|
||||
chrStopFiring(chr);
|
||||
|
||||
chr->actiontype = ACT_GOPOS;
|
||||
chr->act_gopos.endpos.x = pos->x;
|
||||
chr->act_gopos.endpos.y = pos->y;
|
||||
chr->act_gopos.endpos.z = pos->z;
|
||||
chr->act_gopos.endpos = *pos;
|
||||
roomsCopy(room, chr->act_gopos.endrooms);
|
||||
|
||||
chr->act_gopos.target = lastwaypoint;
|
||||
@@ -7565,9 +7539,7 @@ bool chrConsiderGrenadeThrow(struct chrdata *chr, u32 attackflags, u32 entityid)
|
||||
struct coord pos;
|
||||
|
||||
if (target) {
|
||||
pos.x = target->pos.x;
|
||||
pos.y = target->pos.y;
|
||||
pos.z = target->pos.z;
|
||||
pos = target->pos;
|
||||
}
|
||||
|
||||
if (target && cdTestLos04(&chr->prop->pos, chr->prop->rooms, &pos,
|
||||
@@ -8640,9 +8612,7 @@ void chrTickPreArgh(struct chrdata *chr)
|
||||
|
||||
if (modelGetCurAnimFrame(model) >= modelGetAnimEndFrame(model)) {
|
||||
struct coord dir;
|
||||
dir.x = chr->act_preargh.dir.x;
|
||||
dir.y = chr->act_preargh.dir.y;
|
||||
dir.z = chr->act_preargh.dir.z;
|
||||
dir = chr->act_preargh.dir;
|
||||
|
||||
chrReactToDamage(chr, &dir,
|
||||
chr->act_preargh.relshotdir,
|
||||
@@ -9045,9 +9015,7 @@ bool func0f03e9f4(struct chrdata *chr, struct attackanimconfig *animcfg, bool fi
|
||||
if ((flags & ATTACKFLAG_AIMATTARGET) && targetprop->type == PROPTYPE_PLAYER) {
|
||||
f32 eyeheight = g_Vars.players[playermgrGetPlayerNumByProp(targetprop)]->vv_eyeheight;
|
||||
|
||||
targetpos.x = targetprop->pos.x;
|
||||
targetpos.y = targetprop->pos.y;
|
||||
targetpos.z = targetprop->pos.z;
|
||||
targetpos = targetprop->pos;
|
||||
|
||||
if (chr->aibot) {
|
||||
sp174 -= eyeheight * (0.4f + (0.05f * RANDOMFRAC() * arg4));
|
||||
@@ -9144,16 +9112,12 @@ bool func0f03e9f4(struct chrdata *chr, struct attackanimconfig *animcfg, bool fi
|
||||
mtx00016798(sp108, &spc8);
|
||||
mtx00015be0(spb4, &spc8);
|
||||
|
||||
spb8.x = burstrodata->pos.x;
|
||||
spb8.y = burstrodata->pos.y;
|
||||
spb8.z = burstrodata->pos.z;
|
||||
spb8 = burstrodata->pos;
|
||||
|
||||
mtx4TransformVecInPlace(&spc8, &spb8);
|
||||
|
||||
sp114 = 1;
|
||||
sp118.x = spb8.x;
|
||||
sp118.y = spb8.y;
|
||||
sp118.z = spb8.z;
|
||||
sp118 = spb8;
|
||||
}
|
||||
} else {
|
||||
posnode = modelGetPart(gunmodel->filedata, MODELPART_CHRGUN_0001);
|
||||
@@ -9582,9 +9546,7 @@ bool chrGetGunPos(struct chrdata *chr, s32 handnum, struct coord *gunpos)
|
||||
spac = model0001a5cc(model, part0, 0);
|
||||
rodata = &part0->rodata->chrgunfire;
|
||||
|
||||
gunpos->x = rodata->pos.x;
|
||||
gunpos->y = rodata->pos.y;
|
||||
gunpos->z = rodata->pos.z;
|
||||
*gunpos = rodata->pos;
|
||||
|
||||
mtx00015be4(camGetProjectionMtxF(), spac, &sp6c);
|
||||
mtx4TransformVecInPlace(&sp6c, gunpos);
|
||||
@@ -10039,9 +10001,7 @@ void chrTickShoot(struct chrdata *chr, s32 handnum)
|
||||
if (fudgeforeyespy) {
|
||||
hitprop = targetprop;
|
||||
|
||||
hitpos.x = hitprop->pos.x;
|
||||
hitpos.y = hitprop->pos.y;
|
||||
hitpos.z = hitprop->pos.z;
|
||||
hitpos = hitprop->pos;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10151,9 +10111,7 @@ void chrTickShoot(struct chrdata *chr, s32 handnum)
|
||||
} else if ((gset.weaponnum == WEAPON_DEVASTATOR && gset.weaponfunc == FUNC_SECONDARY)
|
||||
|| gset.weaponnum == WEAPON_CROSSBOW) {
|
||||
// Wall hugger grenade or crossbow - aim at target directly
|
||||
aimpos.x = targetprop->pos.x;
|
||||
aimpos.y = targetprop->pos.y;
|
||||
aimpos.z = targetprop->pos.z;
|
||||
aimpos = targetprop->pos;
|
||||
|
||||
if (targetprop->type == PROPTYPE_PLAYER) {
|
||||
aimpos.y -= 25;
|
||||
@@ -10288,9 +10246,7 @@ void chrTickShoot(struct chrdata *chr, s32 handnum)
|
||||
s32 hitpart = HITPART_GENERAL;
|
||||
struct chrdata *targetchr = targetprop->chr;
|
||||
|
||||
hitpos.x = targetprop->pos.x;
|
||||
hitpos.y = targetprop->pos.y;
|
||||
hitpos.z = targetprop->pos.z;
|
||||
hitpos = targetprop->pos;
|
||||
|
||||
if (random() % 2) {
|
||||
hitpos.y += 2 + random() % 10;
|
||||
@@ -11344,9 +11300,7 @@ bool chrDetectDangerousObject(struct chrdata *chr, u8 flags)
|
||||
}
|
||||
|
||||
if (pass && chrGetSquaredDistanceToCoord(chr, &prop->pos) < 1600) {
|
||||
chr->runfrompos.x = g_DangerousProps[i]->pos.x;
|
||||
chr->runfrompos.y = g_DangerousProps[i]->pos.y;
|
||||
chr->runfrompos.z = g_DangerousProps[i]->pos.z;
|
||||
chr->runfrompos = g_DangerousProps[i]->pos;
|
||||
|
||||
if (chr->aibot) {
|
||||
chr->aibot->unk064 |= 0x0004;
|
||||
@@ -11733,17 +11687,11 @@ void func0f044b68(struct coord *arg0, struct coord *arg1, struct coord *arg2)
|
||||
if (sp00.f[0] * sp0c.f[0] + sp00.f[2] * sp0c.f[2] > 0) {
|
||||
// empty
|
||||
} else {
|
||||
sp0c.x = arg0->x;
|
||||
sp0c.y = arg0->y;
|
||||
sp0c.z = arg0->z;
|
||||
sp0c = *arg0;
|
||||
|
||||
arg0->x = arg1->x;
|
||||
arg0->y = arg1->y;
|
||||
arg0->z = arg1->z;
|
||||
*arg0 = *arg1;
|
||||
|
||||
arg1->x = sp0c.x;
|
||||
arg1->y = sp0c.y;
|
||||
arg1->z = sp0c.z;
|
||||
*arg1 = sp0c;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11857,29 +11805,17 @@ bool chrNavCanSeeNextPos(struct chrdata *chr, struct coord *chrpos, s16 *chrroom
|
||||
func0f044b68(&spac, &sp94, &spd4);
|
||||
func0f044b68(&spa0, &sp88, &spd4);
|
||||
|
||||
leftpos->x = spac.x;
|
||||
leftpos->y = spac.y;
|
||||
leftpos->z = spac.z;
|
||||
*leftpos = spac;
|
||||
|
||||
rightpos->x = sp88.x;
|
||||
rightpos->y = sp88.y;
|
||||
rightpos->z = sp88.z;
|
||||
*rightpos = sp88;
|
||||
} else if (spbc) {
|
||||
leftpos->x = spac.x;
|
||||
leftpos->y = spac.y;
|
||||
leftpos->z = spac.z;
|
||||
*leftpos = spac;
|
||||
|
||||
rightpos->x = spa0.x;
|
||||
rightpos->y = spa0.y;
|
||||
rightpos->z = spa0.z;
|
||||
*rightpos = spa0;
|
||||
} else if (spb8) {
|
||||
leftpos->x = sp94.x;
|
||||
leftpos->y = sp94.y;
|
||||
leftpos->z = sp94.z;
|
||||
*leftpos = sp94;
|
||||
|
||||
rightpos->x = sp88.x;
|
||||
rightpos->y = sp88.y;
|
||||
rightpos->z = sp88.z;
|
||||
*rightpos = sp88;
|
||||
} else if (cdExamCylMove07(chrpos, chrrooms, aimpos, sp40, cdtypes, 1, ymax - prop->pos.y, ymin - prop->pos.y) != CDRESULT_COLLISION
|
||||
&& (!arg9 || cdExamCylMove01(chrpos, aimpos, chrradius, sp40, cdtypes, CHECKVERTICAL_YES, ymax - prop->pos.y, ymin - prop->pos.y) != CDRESULT_COLLISION)) {
|
||||
result = true;
|
||||
@@ -12016,38 +11952,22 @@ bool chrNavCheckForObstacle(struct chrdata *chr, struct coord *chrpos, s16 *chrr
|
||||
|
||||
if (spbc && spb8) {
|
||||
if (value1 < value2) {
|
||||
leftpos->x = spac.x;
|
||||
leftpos->y = spac.y;
|
||||
leftpos->z = spac.z;
|
||||
*leftpos = spac;
|
||||
|
||||
rightpos->x = spa0.x;
|
||||
rightpos->y = spa0.y;
|
||||
rightpos->z = spa0.z;
|
||||
*rightpos = spa0;
|
||||
} else {
|
||||
leftpos->x = sp94.x;
|
||||
leftpos->y = sp94.y;
|
||||
leftpos->z = sp94.z;
|
||||
*leftpos = sp94;
|
||||
|
||||
rightpos->x = sp88.x;
|
||||
rightpos->y = sp88.y;
|
||||
rightpos->z = sp88.z;
|
||||
*rightpos = sp88;
|
||||
}
|
||||
} else if (spbc) {
|
||||
leftpos->x = spac.x;
|
||||
leftpos->y = spac.y;
|
||||
leftpos->z = spac.z;
|
||||
*leftpos = spac;
|
||||
|
||||
rightpos->x = spa0.x;
|
||||
rightpos->y = spa0.y;
|
||||
rightpos->z = spa0.z;
|
||||
*rightpos = spa0;
|
||||
} else if (spb8) {
|
||||
leftpos->x = sp94.x;
|
||||
leftpos->y = sp94.y;
|
||||
leftpos->z = sp94.z;
|
||||
*leftpos = sp94;
|
||||
|
||||
rightpos->x = sp88.x;
|
||||
rightpos->y = sp88.y;
|
||||
rightpos->z = sp88.z;
|
||||
*rightpos = sp88;
|
||||
} else if (cdExamCylMove07(chrpos, chrrooms, aimpos, sp40, cdtypes, 1, ymax - prop->pos.y, ymin - prop->pos.y) != CDRESULT_COLLISION
|
||||
&& (!hasobstacle || cdExamCylMove01(chrpos, aimpos, chrradius, sp40, cdtypes, CHECKVERTICAL_YES, ymax - prop->pos.y, ymin - prop->pos.y) != CDRESULT_COLLISION)) {
|
||||
result = true;
|
||||
@@ -12132,14 +12052,10 @@ bool chrNavTryObstacle(struct chrdata *chr, struct coord *arg1, bool arg2, struc
|
||||
if (!arg5 || func0f03645c(chr, &prop->pos, prop->rooms, &sp5c, nextpos, cdtypes)) {
|
||||
if (arg10) {
|
||||
waydata->gotaimposobj = true;
|
||||
waydata->aimposobj.x = sp5c.x;
|
||||
waydata->aimposobj.y = sp5c.y;
|
||||
waydata->aimposobj.z = sp5c.z;
|
||||
waydata->aimposobj = sp5c;
|
||||
} else {
|
||||
waydata->gotaimpos = true;
|
||||
waydata->aimpos.x = sp5c.x;
|
||||
waydata->aimpos.y = sp5c.y;
|
||||
waydata->aimpos.z = sp5c.z;
|
||||
waydata->aimpos = sp5c;
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -12248,9 +12164,7 @@ void chrNavTickMain(struct chrdata *chr, struct coord *nextpos, struct waydata *
|
||||
if (0.0f);
|
||||
|
||||
if (waydata->mode == WAYMODE_INIT || waydata->mode == WAYMODE_RETRY) {
|
||||
sp100.x = nextpos->x;
|
||||
sp100.y = nextpos->y;
|
||||
sp100.z = nextpos->z;
|
||||
sp100 = *nextpos;
|
||||
|
||||
// Check to see if the chr can see the next pad. This is almost
|
||||
// always true, but if the chr has tried to avoid an object they
|
||||
@@ -12258,9 +12172,7 @@ void chrNavTickMain(struct chrdata *chr, struct coord *nextpos, struct waydata *
|
||||
if (chrNavCanSeeNextPos(chr, &prop->pos, prop->rooms, &sp100, &waydata->obstacleleft, &waydata->obstacleright, -chr->radius, chr->radius, CDTYPE_PATHBLOCKER | CDTYPE_BG, arg3)) {
|
||||
// Can see the next pad
|
||||
waydata->gotaimpos = true;
|
||||
waydata->aimpos.x = sp100.x;
|
||||
waydata->aimpos.y = sp100.y;
|
||||
waydata->aimpos.z = sp100.z;
|
||||
waydata->aimpos = sp100;
|
||||
waydata->mode = WAYMODE_HAVEAIMPOS;
|
||||
} else if (waydata->mode == WAYMODE_INIT) {
|
||||
waydata->mode = WAYMODE_LOST1;
|
||||
@@ -12343,9 +12255,7 @@ void chrNavTickMain(struct chrdata *chr, struct coord *nextpos, struct waydata *
|
||||
// No obstacle ahead
|
||||
waydata->gotaimposobj = true;
|
||||
waydata->mode = WAYMODE_INIT;
|
||||
waydata->aimposobj.x = waydata->aimpos.x;
|
||||
waydata->aimposobj.y = waydata->aimpos.y;
|
||||
waydata->aimposobj.z = waydata->aimpos.z;
|
||||
waydata->aimposobj = waydata->aimpos;
|
||||
} else {
|
||||
// Obstacle ahead
|
||||
waydata->mode = WAYMODE_NEWOBSTACLE;
|
||||
@@ -12491,9 +12401,7 @@ void chrNavTickMain(struct chrdata *chr, struct coord *nextpos, struct waydata *
|
||||
}
|
||||
|
||||
if (!waydata->gotaimposobj) {
|
||||
waydata->aimposobj.x = waydata->aimpos.x;
|
||||
waydata->aimposobj.y = waydata->aimpos.y;
|
||||
waydata->aimposobj.z = waydata->aimpos.z;
|
||||
waydata->aimposobj = waydata->aimpos;
|
||||
}
|
||||
|
||||
// Every 10 ticks, attempt to open any door in front of the chr
|
||||
@@ -12895,16 +12803,12 @@ void chrTickGoPos(struct chrdata *chr)
|
||||
if (waypoint) {
|
||||
pad = &g_Pads[waypoint->padnum];
|
||||
|
||||
nextpos.x = pad->pos.x;
|
||||
nextpos.y = pad->pos.y;
|
||||
nextpos.z = pad->pos.z;
|
||||
nextpos = pad->pos;
|
||||
|
||||
nextrooms[0] = pad->room;
|
||||
nextrooms[1] = -1;
|
||||
} else {
|
||||
nextpos.x = chr->act_gopos.endpos.x;
|
||||
nextpos.y = chr->act_gopos.endpos.y;
|
||||
nextpos.z = chr->act_gopos.endpos.z;
|
||||
nextpos = chr->act_gopos.endpos;
|
||||
|
||||
roomsCopy(chr->act_gopos.endrooms, nextrooms);
|
||||
}
|
||||
@@ -12940,16 +12844,12 @@ void chrTickGoPos(struct chrdata *chr)
|
||||
|
||||
if ((pad->flags & PADFLAG_AIWALKDIRECT) == 0 || candosomething) {
|
||||
if (next) {
|
||||
nextpos.x = pad2->pos.x;
|
||||
nextpos.y = pad2->pos.y;
|
||||
nextpos.z = pad2->pos.z;
|
||||
nextpos = pad2->pos;
|
||||
|
||||
nextrooms[0] = pad2->room;
|
||||
nextrooms[1] = -1;
|
||||
} else {
|
||||
nextpos.x = chr->act_gopos.endpos.x;
|
||||
nextpos.y = chr->act_gopos.endpos.y;
|
||||
nextpos.z = chr->act_gopos.endpos.z;
|
||||
nextpos = chr->act_gopos.endpos;
|
||||
|
||||
roomsCopy(chr->act_gopos.endrooms, nextrooms);
|
||||
}
|
||||
@@ -12989,13 +12889,9 @@ void chrTickGoPos(struct chrdata *chr)
|
||||
waypoint = chr->act_gopos.waypoints[chr->act_gopos.curindex];
|
||||
|
||||
if (waypoint) {
|
||||
nextpos.x = g_Pads[waypoint->padnum].pos.x;
|
||||
nextpos.y = g_Pads[waypoint->padnum].pos.y;
|
||||
nextpos.z = g_Pads[waypoint->padnum].pos.z;
|
||||
nextpos = g_Pads[waypoint->padnum].pos;
|
||||
} else {
|
||||
nextpos.x = chr->act_gopos.endpos.x;
|
||||
nextpos.y = chr->act_gopos.endpos.y;
|
||||
nextpos.z = chr->act_gopos.endpos.z;
|
||||
nextpos = chr->act_gopos.endpos;
|
||||
|
||||
if (chr->aibot && chr->myaction == MA_AIBOTGETITEM) {
|
||||
sp240 = false;
|
||||
@@ -13742,9 +13638,7 @@ void chrGetAttackEntityPos(struct chrdata *chr, u32 attackflags, s32 entityid, s
|
||||
targetchr = chr;
|
||||
}
|
||||
|
||||
pos->x = targetchr->prop->pos.x;
|
||||
pos->y = targetchr->prop->pos.y;
|
||||
pos->z = targetchr->prop->pos.z;
|
||||
*pos = targetchr->prop->pos;
|
||||
|
||||
if (targetchr) {
|
||||
chr = targetprop->chr;
|
||||
@@ -13759,9 +13653,7 @@ void chrGetAttackEntityPos(struct chrdata *chr, u32 attackflags, s32 entityid, s
|
||||
// Aiming at a pad by padnum
|
||||
s32 padnum = chrResolvePadId(chr, entityid);
|
||||
|
||||
pos->x = g_Pads[padnum].pos.x;
|
||||
pos->y = g_Pads[padnum].pos.y;
|
||||
pos->z = g_Pads[padnum].pos.z;
|
||||
*pos = g_Pads[padnum].pos;
|
||||
|
||||
rooms[0] = g_Pads[padnum].room;
|
||||
rooms[1] = -1;
|
||||
@@ -13769,9 +13661,7 @@ void chrGetAttackEntityPos(struct chrdata *chr, u32 attackflags, s32 entityid, s
|
||||
// Aiming at the chr's preconfigured target
|
||||
targetprop = chrGetTargetProp(chr);
|
||||
|
||||
pos->x = targetprop->pos.x;
|
||||
pos->y = targetprop->pos.y;
|
||||
pos->z = targetprop->pos.z;
|
||||
*pos = targetprop->pos;
|
||||
|
||||
if (targetprop->type == PROPTYPE_CHR && targetprop->chr) {
|
||||
chr = targetprop->chr;
|
||||
@@ -14975,9 +14865,7 @@ bool chrAdjustPosForSpawn(f32 chrradius, struct coord *pos, s16 *rooms, f32 angl
|
||||
if (cdTestVolume(&testpos, chrradius, testrooms, CDTYPE_ALL, CHECKVERTICAL_YES, ymax, ymin) != CDRESULT_COLLISION
|
||||
&& (allowonscreen || chrIsPosOffScreen(&testpos, testrooms))
|
||||
&& (!arg6 || ground > -100000)) {
|
||||
pos->x = testpos.x;
|
||||
pos->y = testpos.y;
|
||||
pos->z = testpos.z;
|
||||
*pos = testpos;
|
||||
roomsCopy(testrooms, rooms);
|
||||
return true;
|
||||
}
|
||||
@@ -15025,9 +14913,7 @@ bool chrAdjustPosForSpawn(f32 chrradius, struct coord *pos, s16 *rooms, f32 angl
|
||||
if (cdTestLos11(pos, rooms, &testpos, testrooms, CDTYPE_BG)
|
||||
&& cdTestVolume(&testpos, chrradius, testrooms, CDTYPE_ALL, CHECKVERTICAL_YES, 200, -200.0f) != CDRESULT_COLLISION
|
||||
&& (allowonscreen || chrIsPosOffScreen(&testpos, testrooms))) {
|
||||
pos->x = testpos.x;
|
||||
pos->y = testpos.y;
|
||||
pos->z = testpos.z;
|
||||
*pos = testpos;
|
||||
roomsCopy(testrooms, rooms);
|
||||
return true;
|
||||
}
|
||||
@@ -15063,9 +14949,7 @@ struct prop *chrSpawnAtCoord(s32 bodynum, s32 headnum, struct coord *pos, s16 *r
|
||||
headnum = bodyChooseHead(bodynum);
|
||||
}
|
||||
|
||||
pos2.x = pos->x;
|
||||
pos2.y = pos->y;
|
||||
pos2.z = pos->z;
|
||||
pos2 = *pos;
|
||||
roomsCopy(rooms, rooms2);
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
@@ -15233,9 +15117,7 @@ bool chrMoveToPos(struct chrdata *chr, struct coord *pos, s16 *rooms, f32 angle,
|
||||
struct player *player;
|
||||
f32 ground;
|
||||
|
||||
pos2.x = pos->x;
|
||||
pos2.y = pos->y;
|
||||
pos2.z = pos->z;
|
||||
pos2 = *pos;
|
||||
|
||||
roomsCopy(rooms, rooms2);
|
||||
propSetPerimEnabled(chr->prop, false);
|
||||
@@ -15252,9 +15134,7 @@ bool chrMoveToPos(struct chrdata *chr, struct coord *pos, s16 *rooms, f32 angle,
|
||||
chr->ground = ground;
|
||||
chr->manground = ground;
|
||||
chr->sumground = ground * (PAL ? 8.4175090789795f : 9.999998f);
|
||||
chr->prop->pos.x = pos2.x;
|
||||
chr->prop->pos.y = pos2.y;
|
||||
chr->prop->pos.z = pos2.z;
|
||||
chr->prop->pos = pos2;
|
||||
|
||||
propDeregisterRooms(chr->prop);
|
||||
roomsCopy(rooms2, chr->prop->rooms);
|
||||
@@ -15728,9 +15608,7 @@ bool chr0f04c874(struct chrdata *chr, u32 angle360, struct coord *pos, u8 arg3,
|
||||
f32 ymin;
|
||||
f32 radius;
|
||||
|
||||
chrpos.x = chr->prop->pos.x;
|
||||
chrpos.y = chr->prop->pos.y;
|
||||
chrpos.z = chr->prop->pos.z;
|
||||
chrpos = chr->prop->pos;
|
||||
|
||||
do {
|
||||
f32 angle360f = angle360;
|
||||
@@ -15781,9 +15659,7 @@ bool chr0f04c874(struct chrdata *chr, u32 angle360, struct coord *pos, u8 arg3,
|
||||
scale = (tmp - 50.0f) / tmp;
|
||||
|
||||
if (scale < 0) {
|
||||
pos->x = chrpos.x;
|
||||
pos->y = chrpos.y;
|
||||
pos->z = chrpos.z;
|
||||
*pos = chrpos;
|
||||
} else {
|
||||
xdiff *= scale;
|
||||
zdiff *= scale;
|
||||
@@ -15801,9 +15677,7 @@ bool chr0f04c874(struct chrdata *chr, u32 angle360, struct coord *pos, u8 arg3,
|
||||
|
||||
sqdist = xdiff * xdiff + ydiff * ydiff + zdiff * zdiff;
|
||||
|
||||
saved.x = pos->x;
|
||||
saved.y = pos->y;
|
||||
saved.z = pos->z;
|
||||
saved = *pos;
|
||||
|
||||
angle360 = 360 - angle360;
|
||||
again = true;
|
||||
|
||||
+8
-24
@@ -326,9 +326,7 @@ bool explosionCreate(struct prop *sourceprop, struct coord *exppos, s16 *exproom
|
||||
|
||||
expprop->type = PROPTYPE_EXPLOSION;
|
||||
expprop->explosion = exp;
|
||||
expprop->pos.x = exppos->x;
|
||||
expprop->pos.y = exppos->y;
|
||||
expprop->pos.z = exppos->z;
|
||||
expprop->pos = *exppos;
|
||||
|
||||
for (i = 0; exprooms[i] != -1 && i < 7; i++) {
|
||||
expprop->rooms[i] = exprooms[i];
|
||||
@@ -517,21 +515,15 @@ bool explosionCreate(struct prop *sourceprop, struct coord *exppos, s16 *exproom
|
||||
}
|
||||
|
||||
if (makescorch) {
|
||||
exp->unk3d0.x = arg6->x;
|
||||
exp->unk3d0.y = arg6->y;
|
||||
exp->unk3d0.z = arg6->z;
|
||||
exp->unk3d0 = *arg6;
|
||||
exp->room = room;
|
||||
exp->unk3dc.x = arg8->x;
|
||||
exp->unk3dc.y = arg8->y;
|
||||
exp->unk3dc.z = arg8->z;
|
||||
exp->unk3dc = *arg8;
|
||||
} else {
|
||||
exp->unk3d0.x = 999999.875f;
|
||||
}
|
||||
|
||||
exp->parts[0].frame = 1;
|
||||
exp->parts[0].pos.x = exppos->x;
|
||||
exp->parts[0].pos.y = exppos->y;
|
||||
exp->parts[0].pos.z = exppos->z;
|
||||
exp->parts[0].pos = *exppos;
|
||||
exp->parts[0].size = g_ExplosionTypes[type].innersize * (RANDOMFRAC() * 0.5f + 1);
|
||||
exp->parts[0].rot = RANDOMFRAC() * M_BADTAU;
|
||||
exp->parts[0].bb = 0;
|
||||
@@ -1082,13 +1074,9 @@ u32 explosionTick(struct prop *prop)
|
||||
} else {
|
||||
bb = j % exp->numbb;
|
||||
|
||||
spfc.x = exp->bbs[bb].bbmin.x;
|
||||
spfc.y = exp->bbs[bb].bbmin.y;
|
||||
spfc.z = exp->bbs[bb].bbmin.z;
|
||||
spfc = exp->bbs[bb].bbmin;
|
||||
|
||||
spf0.x = exp->bbs[bb].bbmax.x;
|
||||
spf0.y = exp->bbs[bb].bbmax.y;
|
||||
spf0.z = exp->bbs[bb].bbmax.z;
|
||||
spf0 = exp->bbs[bb].bbmax;
|
||||
|
||||
if (spfc.x < sp11c.x) {
|
||||
spfc.x = sp11c.x;
|
||||
@@ -1117,13 +1105,9 @@ u32 explosionTick(struct prop *prop)
|
||||
if (spf0.x <= spfc.x || spf0.y <= spfc.y || spf0.z <= spfc.z) {
|
||||
bb = 0;
|
||||
|
||||
spfc.x = exp->bbs[bb].bbmin.x;
|
||||
spfc.y = exp->bbs[bb].bbmin.y;
|
||||
spfc.z = exp->bbs[bb].bbmin.z;
|
||||
spfc = exp->bbs[bb].bbmin;
|
||||
|
||||
spf0.x = exp->bbs[bb].bbmax.x;
|
||||
spf0.y = exp->bbs[bb].bbmax.y;
|
||||
spf0.z = exp->bbs[bb].bbmax.z;
|
||||
spf0 = exp->bbs[bb].bbmax;
|
||||
|
||||
if (spfc.x < sp11c.x) {
|
||||
spfc.x = sp11c.x;
|
||||
|
||||
+15
-45
@@ -28,9 +28,7 @@ void beamCreate(struct beam *beam, s32 weaponnum, struct coord *from, struct coo
|
||||
{
|
||||
f32 distance;
|
||||
|
||||
beam->from.x = from->x;
|
||||
beam->from.y = from->y;
|
||||
beam->from.z = from->z;
|
||||
beam->from = *from;
|
||||
|
||||
beam->dir.x = to->x - from->x;
|
||||
beam->dir.y = to->y - from->y;
|
||||
@@ -2072,16 +2070,12 @@ void boltbeamFree(struct prop *prop)
|
||||
|
||||
void boltbeamSetHeadPos(s32 beamnum, struct coord *pos)
|
||||
{
|
||||
g_BoltBeams[beamnum].headpos.x = pos->x;
|
||||
g_BoltBeams[beamnum].headpos.y = pos->y;
|
||||
g_BoltBeams[beamnum].headpos.z = pos->z;
|
||||
g_BoltBeams[beamnum].headpos = *pos;
|
||||
}
|
||||
|
||||
void boltbeamSetTailPos(s32 beamnum, struct coord *pos)
|
||||
{
|
||||
g_BoltBeams[beamnum].tailpos.x = pos->x;
|
||||
g_BoltBeams[beamnum].tailpos.y = pos->y;
|
||||
g_BoltBeams[beamnum].tailpos.z = pos->z;
|
||||
g_BoltBeams[beamnum].tailpos = *pos;
|
||||
}
|
||||
|
||||
void boltbeamIncrementHeadPos(s32 beamnum, f32 arg1, bool arg2)
|
||||
@@ -2228,9 +2222,7 @@ Gfx *lasersightRenderDot(Gfx *gdl)
|
||||
mtx4LoadIdentity(&sp1b0);
|
||||
mtx00015be0(camGetWorldToScreenMtxf(), &sp1b0);
|
||||
|
||||
campos.x = player->cam_pos.x;
|
||||
campos.y = player->cam_pos.y;
|
||||
campos.z = player->cam_pos.z;
|
||||
campos = player->cam_pos;
|
||||
|
||||
sp1b0.m[3][0] = 0.0f;
|
||||
sp1b0.m[3][1] = 0.0f;
|
||||
@@ -2250,13 +2242,9 @@ Gfx *lasersightRenderDot(Gfx *gdl)
|
||||
u32 *colours;
|
||||
struct gfxvtx *vertices;
|
||||
|
||||
pos.x = g_LaserSights[i].dotpos.x;
|
||||
pos.y = g_LaserSights[i].dotpos.y;
|
||||
pos.z = g_LaserSights[i].dotpos.z;
|
||||
pos = g_LaserSights[i].dotpos;
|
||||
|
||||
rot.x = g_LaserSights[i].dotrot.x;
|
||||
rot.y = g_LaserSights[i].dotrot.y;
|
||||
rot.z = g_LaserSights[i].dotrot.z;
|
||||
rot = g_LaserSights[i].dotrot;
|
||||
|
||||
colours = gfxAllocateColours(2);
|
||||
|
||||
@@ -2415,9 +2403,7 @@ Gfx *lasersightRenderBeam(Gfx *gdl)
|
||||
mtx4LoadIdentity(&sp198);
|
||||
mtx00015be0(camGetWorldToScreenMtxf(), &sp198);
|
||||
|
||||
campos.x = player->cam_pos.x;
|
||||
campos.y = player->cam_pos.y;
|
||||
campos.z = player->cam_pos.z;
|
||||
campos = player->cam_pos;
|
||||
|
||||
sp198.m[3][0] = 0;
|
||||
sp198.m[3][1] = 0;
|
||||
@@ -2439,9 +2425,7 @@ Gfx *lasersightRenderBeam(Gfx *gdl)
|
||||
struct gfxvtx *vertices;
|
||||
struct coord sp98;
|
||||
|
||||
sp98.x = g_LaserSights[i].beamnear.x;
|
||||
sp98.y = g_LaserSights[i].beamnear.y;
|
||||
sp98.z = g_LaserSights[i].beamnear.z;
|
||||
sp98 = g_LaserSights[i].beamnear;
|
||||
|
||||
mtx4TransformVecInPlace(&sp14c, &sp98);
|
||||
|
||||
@@ -2453,17 +2437,13 @@ Gfx *lasersightRenderBeam(Gfx *gdl)
|
||||
|
||||
mtx4RotateVecInPlace(&sp10c, &spa8);
|
||||
|
||||
spcc.x = g_LaserSights[i].beamnear.x;
|
||||
spcc.y = g_LaserSights[i].beamnear.y;
|
||||
spcc.z = g_LaserSights[i].beamnear.z;
|
||||
spcc = g_LaserSights[i].beamnear;
|
||||
|
||||
spcc.x = (spcc.x - campos.x) * 5.0f;
|
||||
spcc.y = (spcc.y - campos.y) * 5.0f;
|
||||
spcc.z = (spcc.z - campos.z) * 5.0f;
|
||||
|
||||
spc0.x = g_LaserSights[i].beamfar.x;
|
||||
spc0.y = g_LaserSights[i].beamfar.y;
|
||||
spc0.z = g_LaserSights[i].beamfar.z;
|
||||
spc0 = g_LaserSights[i].beamfar;
|
||||
|
||||
spc0.x = (spc0.x - campos.f[0]) * 5.0f;
|
||||
spc0.y = (spc0.y - campos.f[1]) * 5.0f;
|
||||
@@ -2549,17 +2529,11 @@ void lasersightSetBeam(s32 id, s32 arg1, struct coord *near, struct coord *far)
|
||||
g_LaserSights[i].id = id;
|
||||
}
|
||||
|
||||
g_LaserSights[i].unk04.x = near->x;
|
||||
g_LaserSights[i].unk04.y = near->y;
|
||||
g_LaserSights[i].unk04.z = near->z;
|
||||
g_LaserSights[i].unk04 = *near;
|
||||
|
||||
g_LaserSights[i].beamnear.x = near->x;
|
||||
g_LaserSights[i].beamnear.y = near->y;
|
||||
g_LaserSights[i].beamnear.z = near->z;
|
||||
g_LaserSights[i].beamnear = *near;
|
||||
|
||||
g_LaserSights[i].beamfar.x = far->x;
|
||||
g_LaserSights[i].beamfar.y = far->y;
|
||||
g_LaserSights[i].beamfar.z = far->z;
|
||||
g_LaserSights[i].beamfar = *far;
|
||||
|
||||
g_LaserSights[i].unk44 = arg1;
|
||||
g_LaserSights[i].unk28 = 0;
|
||||
@@ -2572,13 +2546,9 @@ void lasersightSetDot(s32 arg0, struct coord *pos, struct coord *rot)
|
||||
if (lasersightExists(arg0, &i)) {
|
||||
g_LaserSights[i].unk28 += 1.0f;
|
||||
|
||||
g_LaserSights[i].dotpos.x = pos->x;
|
||||
g_LaserSights[i].dotpos.y = pos->y;
|
||||
g_LaserSights[i].dotpos.z = pos->z;
|
||||
g_LaserSights[i].dotpos = *pos;
|
||||
|
||||
g_LaserSights[i].dotrot.x = rot->x;
|
||||
g_LaserSights[i].dotrot.y = rot->y;
|
||||
g_LaserSights[i].dotrot.z = rot->z;
|
||||
g_LaserSights[i].dotrot = *rot;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-6
@@ -911,9 +911,7 @@ void lvFindThreats(void)
|
||||
struct prop **propptr = g_Vars.endonscreenprops - 1;
|
||||
struct coord campos;
|
||||
|
||||
campos.x = g_Vars.currentplayer->cam_pos.x;
|
||||
campos.y = g_Vars.currentplayer->cam_pos.y;
|
||||
campos.z = g_Vars.currentplayer->cam_pos.z;
|
||||
campos = g_Vars.currentplayer->cam_pos;
|
||||
|
||||
while (propptr >= g_Vars.onscreenprops) {
|
||||
prop = *propptr;
|
||||
@@ -1422,9 +1420,7 @@ Gfx *lvRender(Gfx *gdl)
|
||||
sndStart(var80095200, SFX_DRUGSPY_FIREDART, 0, -1, -1, -1, -1, -1);
|
||||
g_Vars.currentplayer->eyespydarts--;
|
||||
|
||||
direction.x = g_Vars.currentplayer->eyespy->look.x;
|
||||
direction.y = g_Vars.currentplayer->eyespy->look.y;
|
||||
direction.z = g_Vars.currentplayer->eyespy->look.z;
|
||||
direction = g_Vars.currentplayer->eyespy->look;
|
||||
|
||||
projectileCreate(g_Vars.currentplayer->eyespy->prop, 0,
|
||||
&g_Vars.currentplayer->eyespy->prop->pos, &direction, WEAPON_TRANQUILIZER, NULL);
|
||||
|
||||
+1
-3
@@ -2171,9 +2171,7 @@ Gfx *menugfxRenderBgSuccess(Gfx *gdl)
|
||||
f32 sine = sinf(f0 * M_BADTAU + M_BADTAU * (i / 15.0f));
|
||||
f32 cosine = cosf(f0 * M_BADTAU + M_BADTAU * (i / 15.0f));
|
||||
|
||||
pos.x = g_MenuParticles[i].x;
|
||||
pos.y = g_MenuParticles[i].y;
|
||||
pos.z = g_MenuParticles[i].z;
|
||||
pos = g_MenuParticles[i];
|
||||
|
||||
if (pos.z < -6600.0f) {
|
||||
s3 = -(pos.f[2] + 6600.0f) / 1400.0f * 5.0f;
|
||||
|
||||
+3
-9
@@ -690,9 +690,7 @@ void nbombCreateStorm(struct coord *pos, struct prop *ownerprop)
|
||||
|
||||
nbombReset(&g_Nbombs[index]);
|
||||
|
||||
g_Nbombs[index].pos.x = pos->x;
|
||||
g_Nbombs[index].pos.y = pos->y;
|
||||
g_Nbombs[index].pos.z = pos->z;
|
||||
g_Nbombs[index].pos = *pos;
|
||||
g_Nbombs[index].age240 = 0;
|
||||
g_Nbombs[index].ownerprop = ownerprop;
|
||||
|
||||
@@ -799,9 +797,7 @@ Gfx *nbombRenderOverlay(Gfx *gdl)
|
||||
s16 viewright;
|
||||
s16 viewbottom;
|
||||
|
||||
campos.x = g_Vars.currentplayer->cam_pos.x;
|
||||
campos.y = g_Vars.currentplayer->cam_pos.y;
|
||||
campos.z = g_Vars.currentplayer->cam_pos.z;
|
||||
campos = g_Vars.currentplayer->cam_pos;
|
||||
|
||||
for (i = 0; i < ARRAYCOUNT(g_Nbombs); i++) {
|
||||
if (g_Nbombs[i].age240 >= 0 && g_Nbombs[i].age240 <= TICKS(350)) {
|
||||
@@ -927,9 +923,7 @@ Gfx *gasRender(Gfx *gdl)
|
||||
if (g_Vars.stagenum == STAGE_ESCAPE) {
|
||||
f32 intensityfrac = 1.0f;
|
||||
|
||||
campos.x = g_Vars.currentplayer->cam_pos.x;
|
||||
campos.y = g_Vars.currentplayer->cam_pos.y;
|
||||
campos.z = g_Vars.currentplayer->cam_pos.z;
|
||||
campos = g_Vars.currentplayer->cam_pos;
|
||||
|
||||
for (i = 0; i < 12; i++) {
|
||||
if (roomContainsCoord(&campos, gasrooms[i])) {
|
||||
|
||||
+25
-75
@@ -325,9 +325,7 @@ f32 playerChooseSpawnLocation(f32 chrradius, struct coord *dstpos, s16 *dstrooms
|
||||
slrooms[sllen][0] = pad->room;
|
||||
slrooms[sllen][1] = -1;
|
||||
|
||||
slpositions[sllen].x = pad->pos.x;
|
||||
slpositions[sllen].y = pad->pos.y;
|
||||
slpositions[sllen].z = pad->pos.z;
|
||||
slpositions[sllen] = pad->pos;
|
||||
|
||||
slangles[sllen] = atan2f(pad->look.x, pad->look.z);
|
||||
|
||||
@@ -364,9 +362,7 @@ f32 playerChooseSpawnLocation(f32 chrradius, struct coord *dstpos, s16 *dstrooms
|
||||
slrooms[sllen][0] = pad->room;
|
||||
slrooms[sllen][1] = -1;
|
||||
|
||||
slpositions[sllen].x = pad->pos.x;
|
||||
slpositions[sllen].y = pad->pos.y;
|
||||
slpositions[sllen].z = pad->pos.z;
|
||||
slpositions[sllen] = pad->pos;
|
||||
|
||||
slangles[sllen] = atan2f(pad->look.x, pad->look.z);
|
||||
|
||||
@@ -425,9 +421,7 @@ f32 playerChooseSpawnLocation(f32 chrradius, struct coord *dstpos, s16 *dstrooms
|
||||
slrooms[sllen][0] = pad->room;
|
||||
slrooms[sllen][1] = -1;
|
||||
|
||||
slpositions[sllen].x = pad->pos.x;
|
||||
slpositions[sllen].y = pad->pos.y;
|
||||
slpositions[sllen].z = pad->pos.z;
|
||||
slpositions[sllen] = pad->pos;
|
||||
|
||||
slangles[sllen] = atan2f(pad->look.x, pad->look.z);
|
||||
|
||||
@@ -450,9 +444,7 @@ f32 playerChooseSpawnLocation(f32 chrradius, struct coord *dstpos, s16 *dstrooms
|
||||
if (sllen > 0) {
|
||||
p = random() % sllen;
|
||||
|
||||
dstpos->x = slpositions[p].x;
|
||||
dstpos->y = slpositions[p].y;
|
||||
dstpos->z = slpositions[p].z;
|
||||
*dstpos = slpositions[p];
|
||||
|
||||
roomsCopy(slrooms[p], dstrooms);
|
||||
|
||||
@@ -464,9 +456,7 @@ f32 playerChooseSpawnLocation(f32 chrradius, struct coord *dstpos, s16 *dstrooms
|
||||
dstrooms[0] = pad->room;
|
||||
dstrooms[1] = -1;
|
||||
|
||||
dstpos->x = pad->pos.x;
|
||||
dstpos->y = pad->pos.y;
|
||||
dstpos->z = pad->pos.z;
|
||||
*dstpos = pad->pos;
|
||||
|
||||
dstangle = atan2f(pad->look.x, pad->look.z);
|
||||
}
|
||||
@@ -1108,9 +1098,7 @@ void playerSpawn(void)
|
||||
|
||||
void playerResetBond(struct playerbond *pb, struct coord *pos)
|
||||
{
|
||||
pb->unk10.x = pos->x;
|
||||
pb->unk10.y = pos->y;
|
||||
pb->unk10.z = pos->z;
|
||||
pb->unk10 = *pos;
|
||||
|
||||
pb->unk1c.x = 1;
|
||||
pb->unk1c.y = 0;
|
||||
@@ -1723,9 +1711,7 @@ void playerExecutePreparedWarp(void)
|
||||
// Warp to an exact position with a static direction of 0, 0, 1.
|
||||
// Used by device and holo training to warp player back to room,
|
||||
// and Deep Sea teleports
|
||||
memcampos.x = g_Pads[g_WarpType1Pad].pos.x;
|
||||
memcampos.y = g_Pads[g_WarpType1Pad].pos.y;
|
||||
memcampos.z = g_Pads[g_WarpType1Pad].pos.z;
|
||||
memcampos = g_Pads[g_WarpType1Pad].pos;
|
||||
|
||||
pos.x = memcampos.f[0];
|
||||
pos.y = memcampos.f[1];
|
||||
@@ -1735,15 +1721,11 @@ void playerExecutePreparedWarp(void)
|
||||
} else if (g_WarpType2Params) {
|
||||
// Warp to an exact position with an optional direction.
|
||||
// Used by AI command 00df, but that command is not used.
|
||||
pos.x = g_WarpType2Params->pos.x;
|
||||
pos.y = g_WarpType2Params->pos.y;
|
||||
pos.z = g_WarpType2Params->pos.z;
|
||||
pos = g_WarpType2Params->pos;
|
||||
|
||||
room = g_Pads[g_WarpType2Params->pad].room;
|
||||
|
||||
memcampos.x = g_Pads[g_WarpType2Params->pad].pos.x;
|
||||
memcampos.y = g_Pads[g_WarpType2Params->pad].pos.y;
|
||||
memcampos.z = g_Pads[g_WarpType2Params->pad].pos.z;
|
||||
memcampos = g_Pads[g_WarpType2Params->pad].pos;
|
||||
|
||||
if (1);
|
||||
|
||||
@@ -1758,9 +1740,7 @@ void playerExecutePreparedWarp(void)
|
||||
// Used by AI command 00f4, but that command is not used.
|
||||
room = g_Pads[g_WarpType3Pad].room;
|
||||
|
||||
memcampos.x = g_Pads[g_WarpType3Pad].pos.x;
|
||||
memcampos.y = g_Pads[g_WarpType3Pad].pos.y;
|
||||
memcampos.z = g_Pads[g_WarpType3Pad].pos.z;
|
||||
memcampos = g_Pads[g_WarpType3Pad].pos;
|
||||
|
||||
pos.x = memcampos.x + sinf(g_WarpType3PosAngle) * g_WarpType3Range + cosf(g_WarpType3PosAngle) * 0.0f;
|
||||
pos.y = memcampos.y + g_WarpType3MoreHeight + g_WarpType3Height;
|
||||
@@ -2701,9 +2681,7 @@ void playerTickExplode(void)
|
||||
&& g_Vars.lvframe60 > g_Vars.currentplayer->bondnextexplode) {
|
||||
struct coord pos;
|
||||
|
||||
pos.x = g_Vars.currentplayer->prop->pos.x;
|
||||
pos.y = g_Vars.currentplayer->prop->pos.y;
|
||||
pos.z = g_Vars.currentplayer->prop->pos.z;
|
||||
pos = g_Vars.currentplayer->prop->pos;
|
||||
|
||||
switch (g_Vars.currentplayer->bondcurexplode % 4) {
|
||||
case 0: pos.x += 250.0f + 150.0f * RANDOMFRAC(); break;
|
||||
@@ -3658,9 +3636,7 @@ void playerTick(bool arg0)
|
||||
struct coord sp308;
|
||||
playermgrSetFovY(120);
|
||||
viSetFovY(120);
|
||||
sp308.x = g_Vars.currentplayer->eyespy->prop->pos.x;
|
||||
sp308.y = g_Vars.currentplayer->eyespy->prop->pos.y;
|
||||
sp308.z = g_Vars.currentplayer->eyespy->prop->pos.z;
|
||||
sp308 = g_Vars.currentplayer->eyespy->prop->pos;
|
||||
playerTickChrBody();
|
||||
bmoveTick(0, 0, 0, 1);
|
||||
playerSetCameraMode(CAMERAMODE_EYESPY);
|
||||
@@ -3712,9 +3688,7 @@ void playerTick(bool arg0)
|
||||
sp2b8[2][1] = rocket->base.realrot[2][1] / sp2a8;
|
||||
sp2b8[2][2] = rocket->base.realrot[2][2] / sp2a8;
|
||||
|
||||
rocketpos.x = rocket->base.prop->pos.x;
|
||||
rocketpos.y = rocket->base.prop->pos.y;
|
||||
rocketpos.z = rocket->base.prop->pos.z;
|
||||
rocketpos = rocket->base.prop->pos;
|
||||
|
||||
bgFindRoomsByPos(&rocketpos, inrooms, aboverooms, 20, &bestroom);
|
||||
|
||||
@@ -3979,9 +3953,7 @@ void playerTick(bool arg0)
|
||||
playerUpdateShake();
|
||||
playerSetCameraMode(CAMERAMODE_DEFAULT);
|
||||
|
||||
spf4.x = g_Vars.currentplayer->bond2.unk10.x;
|
||||
spf4.y = g_Vars.currentplayer->bond2.unk10.y;
|
||||
spf4.z = g_Vars.currentplayer->bond2.unk10.z;
|
||||
spf4 = g_Vars.currentplayer->bond2.unk10;
|
||||
|
||||
spf4.x = a + spf4.x;
|
||||
spf4.y = b + spf4.y;
|
||||
@@ -4514,18 +4486,14 @@ void playerSetGlobalDrawWorldOffset(s32 room)
|
||||
{
|
||||
room0f166df0(room, &g_Vars.currentplayer->globaldrawworldoffset);
|
||||
|
||||
g_Vars.currentplayer->globaldrawworldbgoffset.x = g_Vars.currentplayer->globaldrawworldoffset.x;
|
||||
g_Vars.currentplayer->globaldrawworldbgoffset.y = g_Vars.currentplayer->globaldrawworldoffset.y;
|
||||
g_Vars.currentplayer->globaldrawworldbgoffset.z = g_Vars.currentplayer->globaldrawworldoffset.z;
|
||||
g_Vars.currentplayer->globaldrawworldbgoffset = g_Vars.currentplayer->globaldrawworldoffset;
|
||||
|
||||
roomSetLastForOffset(room);
|
||||
}
|
||||
|
||||
void playerSetGlobalDrawCameraOffset(void)
|
||||
{
|
||||
g_Vars.currentplayer->globaldrawcameraoffset.x = g_Vars.currentplayer->globaldrawworldoffset.x;
|
||||
g_Vars.currentplayer->globaldrawcameraoffset.y = g_Vars.currentplayer->globaldrawworldoffset.y;
|
||||
g_Vars.currentplayer->globaldrawcameraoffset.z = g_Vars.currentplayer->globaldrawworldoffset.z;
|
||||
g_Vars.currentplayer->globaldrawcameraoffset = g_Vars.currentplayer->globaldrawworldoffset;
|
||||
|
||||
mtx4RotateVecInPlace(camGetWorldToScreenMtxf(), &g_Vars.currentplayer->globaldrawcameraoffset);
|
||||
}
|
||||
@@ -5156,9 +5124,7 @@ void playerDieByShooter(u32 shooter, bool force)
|
||||
g_Vars.currentplayer->bonddie = g_Vars.currentplayer->bond2;
|
||||
g_Vars.currentplayer->thetadie = g_Vars.currentplayer->vv_theta;
|
||||
g_Vars.currentplayer->vertadie = g_Vars.currentplayer->vv_verta;
|
||||
g_Vars.currentplayer->posdie.x = g_Vars.currentplayer->prop->pos.x;
|
||||
g_Vars.currentplayer->posdie.y = g_Vars.currentplayer->prop->pos.y;
|
||||
g_Vars.currentplayer->posdie.z = g_Vars.currentplayer->prop->pos.z;
|
||||
g_Vars.currentplayer->posdie = g_Vars.currentplayer->prop->pos;
|
||||
|
||||
if (g_Vars.currentplayer->bondmovemode == MOVEMODE_WALK) {
|
||||
if (g_Vars.currentplayer->unk1af0) {
|
||||
@@ -5372,9 +5338,7 @@ void player0f0c1bd8(struct coord *pos, struct coord *up, struct coord *look)
|
||||
|
||||
void playerSetCamPropertiesWithRoom(struct coord *pos, struct coord *up, struct coord *look, s32 room)
|
||||
{
|
||||
g_Vars.currentplayer->memcampos.x = pos->x;
|
||||
g_Vars.currentplayer->memcampos.y = pos->y;
|
||||
g_Vars.currentplayer->memcampos.z = pos->z;
|
||||
g_Vars.currentplayer->memcampos = *pos;
|
||||
g_Vars.currentplayer->memcamroom = room;
|
||||
|
||||
playerSetCamProperties(pos, up, look, room);
|
||||
@@ -5390,15 +5354,9 @@ void playerSetCamProperties(struct coord *pos, struct coord *up, struct coord *l
|
||||
{
|
||||
struct player *player = g_Vars.currentplayer;
|
||||
|
||||
player->cam_pos.x = pos->x;
|
||||
player->cam_pos.y = pos->y;
|
||||
player->cam_pos.z = pos->z;
|
||||
player->cam_up.x = up->x;
|
||||
player->cam_up.y = up->y;
|
||||
player->cam_up.z = up->z;
|
||||
player->cam_look.x = look->x;
|
||||
player->cam_look.y = look->y;
|
||||
player->cam_look.z = look->z;
|
||||
player->cam_pos = *pos;
|
||||
player->cam_up = *up;
|
||||
player->cam_look = *look;
|
||||
player->cam_room = room;
|
||||
}
|
||||
|
||||
@@ -5636,9 +5594,7 @@ s32 playerTickThirdPerson(struct prop *prop)
|
||||
player->vv_theta = (M_BADTAU - chrGetInverseTheta(chr)) * 360.0f / M_BADTAU;
|
||||
player->vv_verta = 0;
|
||||
} else {
|
||||
sp9c.x = player->prop->pos.x;
|
||||
sp9c.y = player->prop->pos.y;
|
||||
sp9c.z = player->prop->pos.z;
|
||||
sp9c = player->prop->pos;
|
||||
|
||||
player->vv_theta = (M_BADTAU - chrGetInverseTheta(chr)) * 360.0f / M_BADTAU;
|
||||
player->vv_verta = 0;
|
||||
@@ -5692,9 +5648,7 @@ s32 playerTickThirdPerson(struct prop *prop)
|
||||
chrSetFiring(chr, HAND_LEFT, player->hands[HAND_LEFT].flashon);
|
||||
}
|
||||
|
||||
sp80.x = prop->pos.x;
|
||||
sp80.y = prop->pos.y;
|
||||
sp80.z = prop->pos.z;
|
||||
sp80 = prop->pos;
|
||||
|
||||
modelGetRootPosition(chr->model, &sp8c);
|
||||
|
||||
@@ -5717,18 +5671,14 @@ s32 playerTickThirdPerson(struct prop *prop)
|
||||
|
||||
tickop2 = chrTick(prop);
|
||||
|
||||
prop->pos.x = sp80.x;
|
||||
prop->pos.y = sp80.y;
|
||||
prop->pos.z = sp80.z;
|
||||
prop->pos = sp80;
|
||||
|
||||
if ((chr->hidden & CHRHFLAG_00000800) == 0) {
|
||||
for (i = 0; i < 2; i++) {
|
||||
if (chrGetGunPos(chr, i, &player->chrmuzzlelastpos[i])) {
|
||||
player->chrmuzzlelast[i] = g_Vars.lvframenum;
|
||||
} else if (player->chrmuzzlelast[i] < g_Vars.lvframenum - 1) {
|
||||
player->chrmuzzlelastpos[i].x = player->hands[i].muzzlepos.x;
|
||||
player->chrmuzzlelastpos[i].y = player->hands[i].muzzlepos.y;
|
||||
player->chrmuzzlelastpos[i].z = player->hands[i].muzzlepos.z;
|
||||
player->chrmuzzlelastpos[i] = player->hands[i].muzzlepos;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+10
-30
@@ -611,21 +611,13 @@ struct prop *shotCalculateHits(s32 handnum, bool arg1, struct coord *arg2, struc
|
||||
|
||||
bgun0f0a9494(arg6);
|
||||
|
||||
shotdata.gunpos.x = gunpos->x;
|
||||
shotdata.gunpos.y = gunpos->y;
|
||||
shotdata.gunpos.z = gunpos->z;
|
||||
shotdata.gunpos = *gunpos;
|
||||
|
||||
shotdata.unk00.x = arg2->x;
|
||||
shotdata.unk00.y = arg2->y;
|
||||
shotdata.unk00.z = arg2->z;
|
||||
shotdata.unk00 = *arg2;
|
||||
|
||||
shotdata.dir.x = dir->x;
|
||||
shotdata.dir.y = dir->y;
|
||||
shotdata.dir.z = dir->z;
|
||||
shotdata.dir = *dir;
|
||||
|
||||
shotdata.unk0c.x = arg3->x;
|
||||
shotdata.unk0c.y = arg3->y;
|
||||
shotdata.unk0c.z = arg3->z;
|
||||
shotdata.unk0c = *arg3;
|
||||
|
||||
gsetPopulateFromCurrentPlayer(handnum, &shotdata.gset);
|
||||
func = gsetGetWeaponFunction(&shotdata.gset);
|
||||
@@ -708,9 +700,7 @@ struct prop *shotCalculateHits(s32 handnum, bool arg1, struct coord *arg2, struc
|
||||
|
||||
sp694 = sp664;
|
||||
|
||||
hitpos.x = sp664.unk00.x;
|
||||
hitpos.y = sp664.unk00.y;
|
||||
hitpos.z = sp664.unk00.z;
|
||||
hitpos = sp664.unk00;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -746,9 +736,7 @@ struct prop *shotCalculateHits(s32 handnum, bool arg1, struct coord *arg2, struc
|
||||
hitindex = -1;
|
||||
|
||||
if (shotdata.hits[0].prop) {
|
||||
spa0.x = shotdata.hits[0].pos.x;
|
||||
spa0.y = shotdata.hits[0].pos.y;
|
||||
spa0.z = shotdata.hits[0].pos.z;
|
||||
spa0 = shotdata.hits[0].pos;
|
||||
hitindex = 0;
|
||||
}
|
||||
|
||||
@@ -782,9 +770,7 @@ struct prop *shotCalculateHits(s32 handnum, bool arg1, struct coord *arg2, struc
|
||||
if (shotdata.hits[i].unk4d) {
|
||||
sp6cc = true;
|
||||
doexplosiveshells = explosiveshells;
|
||||
hitpos.x = shotdata.hits[i].pos.x;
|
||||
hitpos.y = shotdata.hits[i].pos.y;
|
||||
hitpos.z = shotdata.hits[i].pos.z;
|
||||
hitpos = shotdata.hits[i].pos;
|
||||
} else if (shotdata.hits[i].unk4c
|
||||
|| (explosiveshells && (obj->type == OBJTYPE_GLASS || obj->type == OBJTYPE_TINTEDGLASS))) {
|
||||
s1++;
|
||||
@@ -792,16 +778,12 @@ struct prop *shotCalculateHits(s32 handnum, bool arg1, struct coord *arg2, struc
|
||||
if (s1 >= shotdata.penetration) {
|
||||
sp6cc = true;
|
||||
doexplosiveshells = explosiveshells;
|
||||
hitpos.x = shotdata.hits[i].pos.x;
|
||||
hitpos.y = shotdata.hits[i].pos.y;
|
||||
hitpos.z = shotdata.hits[i].pos.z;
|
||||
hitpos = shotdata.hits[i].pos;
|
||||
}
|
||||
}
|
||||
|
||||
if (doexplosiveshells) {
|
||||
sp8c.x = shotdata.hits[i].pos.x;
|
||||
sp8c.y = shotdata.hits[i].pos.y;
|
||||
sp8c.z = shotdata.hits[i].pos.z;
|
||||
sp8c = shotdata.hits[i].pos;
|
||||
|
||||
func0f065e74(&root->pos, root->rooms, &sp8c, sp7c);
|
||||
explosionCreateSimple(0, &sp8c, sp7c, EXPLOSIONTYPE_PHOENIX, g_Vars.currentplayernum);
|
||||
@@ -1082,9 +1064,7 @@ void func0f061fa8(struct shotdata *shotdata, struct prop *prop, f32 arg2, s32 hi
|
||||
hit->model = model;
|
||||
hit->unk4c = arg9;
|
||||
hit->unk4d = arg10;
|
||||
hit->pos.x = arg11->x;
|
||||
hit->pos.y = arg11->y;
|
||||
hit->pos.z = arg11->z;
|
||||
hit->pos = *arg11;
|
||||
|
||||
fVar8 = sqrtf(arg12->f[0] * arg12->f[0] + arg12->f[1] * arg12->f[1] + arg12->f[2] * arg12->f[2]);
|
||||
|
||||
|
||||
+75
-225
@@ -2144,9 +2144,7 @@ void func0f06a580(struct defaultobj *obj, struct coord *pos, Mtxf *matrix, s16 *
|
||||
|
||||
mtx4ToMtx3(matrix, obj->realrot);
|
||||
|
||||
prop->pos.x = pos->x;
|
||||
prop->pos.y = pos->y;
|
||||
prop->pos.z = pos->z;
|
||||
prop->pos = *pos;
|
||||
|
||||
propDeregisterRooms(prop);
|
||||
roomsCopy(rooms, prop->rooms);
|
||||
@@ -2619,9 +2617,7 @@ bool func0f06b488(struct prop *prop, struct coord *arg1, struct coord *arg2, str
|
||||
if (f0 < *arg6) {
|
||||
*arg6 = f0;
|
||||
|
||||
arg4->x = sp20.x;
|
||||
arg4->y = sp20.y;
|
||||
arg4->z = sp20.z;
|
||||
*arg4 = sp20;
|
||||
|
||||
arg5->x = -arg3->x;
|
||||
arg5->y = 0.0f;
|
||||
@@ -3134,15 +3130,11 @@ bool projectileFindCollidingProp(struct prop *prop, struct coord *pos1, struct c
|
||||
sp98.y *= tmp;
|
||||
sp98.z *= tmp;
|
||||
|
||||
sp88.x = pos1->x;
|
||||
sp88.y = pos1->y;
|
||||
sp88.z = pos1->z;
|
||||
sp88 = *pos1;
|
||||
|
||||
mtx4TransformVecInPlace(camGetWorldToScreenMtxf(), &sp88);
|
||||
|
||||
sp7c.x = sp98.x;
|
||||
sp7c.y = sp98.y;
|
||||
sp7c.z = sp98.z;
|
||||
sp7c = sp98;
|
||||
|
||||
mtx4RotateVecInPlace(camGetWorldToScreenMtxf(), &sp7c);
|
||||
|
||||
@@ -3208,13 +3200,9 @@ bool projectileFindCollidingProp(struct prop *prop, struct coord *pos1, struct c
|
||||
if (spa4) {
|
||||
result = true;
|
||||
|
||||
var8009ce78.x = sp98.x;
|
||||
var8009ce78.y = sp98.y;
|
||||
var8009ce78.z = sp98.z;
|
||||
var8009ce78 = sp98;
|
||||
|
||||
var8009ce88.x = sp7c.x;
|
||||
var8009ce88.y = sp7c.y;
|
||||
var8009ce88.z = sp7c.z;
|
||||
var8009ce88 = sp7c;
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -3243,9 +3231,7 @@ s32 func0f06cd00(struct defaultobj *obj, struct coord *pos, struct coord *arg2,
|
||||
g_EmbedProp = 0;
|
||||
var80069944 = 0;
|
||||
|
||||
sp1c4.x = pos->x;
|
||||
sp1c4.y = pos->y;
|
||||
sp1c4.z = pos->z;
|
||||
sp1c4 = *pos;
|
||||
|
||||
if ((prop->pos.x != pos->x || prop->pos.y != pos->y || prop->pos.z != pos->z)
|
||||
&& (obj->hidden & OBJHFLAG_PROJECTILE)
|
||||
@@ -3308,21 +3294,15 @@ s32 func0f06cd00(struct defaultobj *obj, struct coord *pos, struct coord *arg2,
|
||||
&& (prop->pos.f[0] != hitthing.unk00.f[0] || prop->pos.f[1] != hitthing.unk00.f[1] || prop->pos.f[2] != hitthing.unk00.f[2])) {
|
||||
cdresult = CDRESULT_COLLISION;
|
||||
|
||||
sp1c4.x = hitthing.unk00.x;
|
||||
sp1c4.y = hitthing.unk00.y;
|
||||
sp1c4.z = hitthing.unk00.z;
|
||||
sp1c4 = hitthing.unk00;
|
||||
|
||||
arg3->x = hitthing.unk0c.x;
|
||||
arg3->y = hitthing.unk0c.y;
|
||||
arg3->z = hitthing.unk0c.z;
|
||||
*arg3 = hitthing.unk0c;
|
||||
}
|
||||
}
|
||||
|
||||
if (!projectileFindCollidingProp(prop, &prop->pos, &sp1c4, CDTYPE_ALL, arg2, arg3, spcc)) {
|
||||
if (cdresult == CDRESULT_COLLISION) {
|
||||
arg2->x = sp1c4.x;
|
||||
arg2->y = sp1c4.y;
|
||||
arg2->z = sp1c4.z;
|
||||
*arg2 = sp1c4;
|
||||
}
|
||||
} else {
|
||||
cdresult = CDRESULT_COLLISION;
|
||||
@@ -3381,9 +3361,7 @@ bool func0f06d37c(struct defaultobj *obj, struct coord *arg1, struct coord *arg2
|
||||
g_EmbedProp = NULL;
|
||||
var80069944 = 0;
|
||||
|
||||
sp80.x = arg1->x;
|
||||
sp80.y = arg1->y;
|
||||
sp80.z = arg1->z;
|
||||
sp80 = *arg1;
|
||||
|
||||
if (prop->pos.x != arg1->x || prop->pos.y != arg1->y || prop->pos.z != arg1->z) {
|
||||
if (obj->hidden & OBJHFLAG_PROJECTILE) {
|
||||
@@ -3391,9 +3369,7 @@ bool func0f06d37c(struct defaultobj *obj, struct coord *arg1, struct coord *arg2
|
||||
setup0f09233c(obj, &sp80, obj->realrot, rooms);
|
||||
|
||||
if (cdExamCylMove02(&prop->pos, &sp80, radius, rooms, CDTYPE_ALL, false, 0.0f, 0.0f) != CDRESULT_COLLISION) {
|
||||
prop->pos.x = sp80.x;
|
||||
prop->pos.y = sp80.y;
|
||||
prop->pos.z = sp80.z;
|
||||
prop->pos = sp80;
|
||||
|
||||
propDeregisterRooms(prop);
|
||||
roomsCopy(rooms, prop->rooms);
|
||||
@@ -3484,9 +3460,7 @@ bool func0f06d37c(struct defaultobj *obj, struct coord *arg1, struct coord *arg2
|
||||
setup0f09233c(obj, &sp4c, obj->realrot, rooms);
|
||||
|
||||
if (cdTestVolume(&sp4c, radius, rooms, CDTYPE_ALL, CHECKVERTICAL_NO, 0.0f, 0.0f) != CDRESULT_COLLISION) {
|
||||
prop->pos.x = sp4c.x;
|
||||
prop->pos.y = sp4c.y;
|
||||
prop->pos.z = sp4c.z;
|
||||
prop->pos = sp4c;
|
||||
|
||||
propDeregisterRooms(prop);
|
||||
roomsCopy(rooms, prop->rooms);
|
||||
@@ -3495,9 +3469,7 @@ bool func0f06d37c(struct defaultobj *obj, struct coord *arg1, struct coord *arg2
|
||||
}
|
||||
}
|
||||
} else {
|
||||
arg2->x = sp80.x;
|
||||
arg2->y = sp80.y;
|
||||
arg2->z = sp80.z;
|
||||
*arg2 = sp80;
|
||||
}
|
||||
|
||||
if (!sp98) {
|
||||
@@ -4185,9 +4157,7 @@ bool propExplode(struct prop *prop, s32 exptype)
|
||||
|
||||
mtx4TransformVecInPlace(camGetProjectionMtxF(), &pos);
|
||||
} else {
|
||||
pos.x = parent->pos.x;
|
||||
pos.y = parent->pos.y;
|
||||
pos.z = parent->pos.z;
|
||||
pos = parent->pos;
|
||||
}
|
||||
|
||||
func0f065e74(&parent->pos, parent->rooms, &pos, rooms);
|
||||
@@ -4296,9 +4266,7 @@ void weaponTick(struct prop *prop)
|
||||
|
||||
projectileSetSticky(prop);
|
||||
|
||||
projectile->speed.x = direction.x;
|
||||
projectile->speed.y = direction.y;
|
||||
projectile->speed.z = direction.z;
|
||||
projectile->speed = direction;
|
||||
|
||||
mtx4LoadIdentity(&projectile->mtx);
|
||||
|
||||
@@ -5730,9 +5698,7 @@ void func0f070ca0(struct defaultobj *obj, struct geotilef *tile, u32 flags, stru
|
||||
tile->header.numvertices = 4;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
tile->vertices[i].x = vertices[i].x;
|
||||
tile->vertices[i].y = vertices[i].y;
|
||||
tile->vertices[i].z = vertices[i].z;
|
||||
tile->vertices[i] = vertices[i];
|
||||
}
|
||||
|
||||
tile->floorcol = 0xfff;
|
||||
@@ -6342,9 +6308,7 @@ s32 func0f072144(struct defaultobj *obj, struct coord *arg1, f32 arg2, bool arg3
|
||||
}
|
||||
}
|
||||
|
||||
pos.x = prop->pos.x;
|
||||
pos.y = prop->pos.y;
|
||||
pos.z = prop->pos.z;
|
||||
pos = prop->pos;
|
||||
|
||||
propSetPerimEnabled(prop, false);
|
||||
|
||||
@@ -6535,9 +6499,7 @@ f32 objCollide(struct defaultobj *movingobj, struct coord *movingvel, f32 rotati
|
||||
sp4c.y -= sp58.y;
|
||||
sp4c.z -= sp58.z;
|
||||
} else {
|
||||
sp58.x = movingobj->prop->pos.x;
|
||||
sp58.y = movingobj->prop->pos.y;
|
||||
sp58.z = movingobj->prop->pos.z;
|
||||
sp58 = movingobj->prop->pos;
|
||||
|
||||
sp4c.x = obstacle->pos.x - movingobj->prop->pos.x;
|
||||
sp4c.y = obstacle->pos.y - movingobj->prop->pos.y;
|
||||
@@ -6874,9 +6836,7 @@ bool rocketTickFbw(struct weaponobj *rocket)
|
||||
dir.f[1] = sinf(projectile->unk014);
|
||||
dir.f[2] = cosf(projectile->unk018) * cosf(projectile->unk014);
|
||||
|
||||
newpos.x = rocketprop->pos.x;
|
||||
newpos.y = rocketprop->pos.y;
|
||||
newpos.z = rocketprop->pos.z;
|
||||
newpos = rocketprop->pos;
|
||||
|
||||
for (i = 0; i < g_Vars.lvupdate60; i++) {
|
||||
projectile->unk010 += PAL ? 0.0021600001f : 0.0018f;
|
||||
@@ -6906,9 +6866,7 @@ bool rocketTickFbw(struct weaponobj *rocket)
|
||||
if (cdresult == CDRESULT_NOCOLLISION) {
|
||||
func0f065e74(&rocketprop->pos, rocketprop->rooms, &newpos, newrooms);
|
||||
|
||||
rocketprop->pos.x = newpos.x;
|
||||
rocketprop->pos.y = newpos.y;
|
||||
rocketprop->pos.z = newpos.z;
|
||||
rocketprop->pos = newpos;
|
||||
|
||||
propDeregisterRooms(rocketprop);
|
||||
roomsCopy(newrooms, rocketprop->rooms);
|
||||
@@ -6956,9 +6914,7 @@ bool rocketTickFbw(struct weaponobj *rocket)
|
||||
&& cdTestLos05(&rocketprop->pos, rocketprop->rooms, &chr->prop->pos, chr->prop->rooms,
|
||||
CDTYPE_OBJS | CDTYPE_DOORS | CDTYPE_PATHBLOCKER | CDTYPE_BG | CDTYPE_AIOPAQUE,
|
||||
GEOFLAG_BLOCK_SIGHT)) {
|
||||
projectile->nextsteppos.x = chr->prop->pos.x;
|
||||
projectile->nextsteppos.y = chr->prop->pos.y;
|
||||
projectile->nextsteppos.z = chr->prop->pos.z;
|
||||
projectile->nextsteppos = chr->prop->pos;
|
||||
projectile->numwaypads = 0;
|
||||
}
|
||||
}
|
||||
@@ -7006,9 +6962,7 @@ s32 projectileLaunch(struct defaultobj *obj, struct projectile *projectile, stru
|
||||
|
||||
func0f065e74(&prop->pos, prop->rooms, &projectile->nextsteppos, rooms);
|
||||
|
||||
prop->pos.x = projectile->nextsteppos.x;
|
||||
prop->pos.y = projectile->nextsteppos.y;
|
||||
prop->pos.z = projectile->nextsteppos.z;
|
||||
prop->pos = projectile->nextsteppos;
|
||||
|
||||
propDeregisterRooms(prop);
|
||||
roomsCopy(rooms, prop->rooms);
|
||||
@@ -7021,9 +6975,7 @@ s32 projectileLaunch(struct defaultobj *obj, struct projectile *projectile, stru
|
||||
|
||||
func0f065e74(&prop->pos, prop->rooms, arg2, rooms);
|
||||
|
||||
prop->pos.x = arg2->x;
|
||||
prop->pos.y = arg2->y;
|
||||
prop->pos.z = arg2->z;
|
||||
prop->pos = *arg2;
|
||||
|
||||
propDeregisterRooms(prop);
|
||||
roomsCopy(rooms, prop->rooms);
|
||||
@@ -7075,9 +7027,7 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
||||
projectileLaunch(obj, projectile, &sp5e8, &sp5f4);
|
||||
}
|
||||
|
||||
sp5dc.x = prop->pos.x;
|
||||
sp5dc.y = prop->pos.y;
|
||||
sp5dc.z = prop->pos.z;
|
||||
sp5dc = prop->pos;
|
||||
|
||||
if (projectile->pickuptimer240 > 0) {
|
||||
projectile->pickuptimer240 -= g_Vars.lvupdate240;
|
||||
@@ -7272,9 +7222,7 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
||||
sp3c4.y = sp3d0.y;
|
||||
sp3c4.z = sp3d0.x;
|
||||
|
||||
sp3d0.x = prop->pos.x;
|
||||
sp3d0.y = prop->pos.y;
|
||||
sp3d0.z = prop->pos.z;
|
||||
sp3d0 = prop->pos;
|
||||
}
|
||||
|
||||
func0f02e4f8(&sp3d0, &sp3c4, &sp3b8);
|
||||
@@ -7441,9 +7389,7 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
||||
}
|
||||
|
||||
if (cdresult == CDRESULT_NOCOLLISION) {
|
||||
projectile->speed.x = sp590.x;
|
||||
projectile->speed.y = sp590.y;
|
||||
projectile->speed.z = sp590.z;
|
||||
projectile->speed = sp590;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7558,9 +7504,7 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
||||
mtx.m[2][1] = obj->realrot[2][1] / sp29c;
|
||||
mtx.m[2][2] = obj->realrot[2][2] / sp29c;
|
||||
|
||||
sp2f8.x = obj->prop->pos.x;
|
||||
sp2f8.y = obj->prop->pos.y;
|
||||
sp2f8.z = obj->prop->pos.z;
|
||||
sp2f8 = obj->prop->pos;
|
||||
|
||||
sp290.x = projectile->targetprop->pos.x - sp2f8.x;
|
||||
sp290.y = projectile->targetprop->pos.y - sp2f8.y;
|
||||
@@ -7568,9 +7512,7 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
||||
|
||||
guNormalize(&sp290.x, &sp290.y, &sp290.z);
|
||||
|
||||
sp2ec.x = projectile->speed.x;
|
||||
sp2ec.y = projectile->speed.y;
|
||||
sp2ec.z = projectile->speed.z;
|
||||
sp2ec = projectile->speed;
|
||||
|
||||
guNormalize(&sp2ec.x, &sp2ec.y, &sp2ec.z);
|
||||
|
||||
@@ -7663,9 +7605,7 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
||||
func0f096698(&sp30c, &projectile->mtx, g_Vars.lvupdate240);
|
||||
mtx4ToMtx3(&sp30c, obj->realrot);
|
||||
|
||||
sp5c8.x = prop->pos.x;
|
||||
sp5c8.y = prop->pos.y;
|
||||
sp5c8.z = prop->pos.z;
|
||||
sp5c8 = prop->pos;
|
||||
|
||||
roomsCopy(prop->rooms, sp5b8);
|
||||
|
||||
@@ -7943,9 +7883,7 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
||||
struct coord dir;
|
||||
struct prop *ownerprop = obj->projectile->ownerprop;
|
||||
|
||||
dir.x = projectile->speed.x;
|
||||
dir.y = projectile->speed.y;
|
||||
dir.z = projectile->speed.z;
|
||||
dir = projectile->speed;
|
||||
|
||||
guNormalize(&dir.x, &dir.y, &dir.z);
|
||||
|
||||
@@ -7968,9 +7906,7 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
||||
|
||||
func0f065e74(&prop->pos, prop->rooms, &sp5dc, rooms);
|
||||
|
||||
prop->pos.x = sp5dc.x;
|
||||
prop->pos.y = sp5dc.y;
|
||||
prop->pos.z = sp5dc.z;
|
||||
prop->pos = sp5dc;
|
||||
|
||||
propDeregisterRooms(prop);
|
||||
roomsCopy(rooms, prop->rooms);
|
||||
@@ -7981,16 +7917,12 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
||||
sp5dc.x = prop->pos.x;
|
||||
sp5dc.z = prop->pos.z;
|
||||
} else {
|
||||
sp5dc.x = sp5e8.x;
|
||||
sp5dc.y = sp5e8.y;
|
||||
sp5dc.z = sp5e8.z;
|
||||
sp5dc = sp5e8;
|
||||
}
|
||||
|
||||
func0f065e74(&prop->pos, prop->rooms, &sp5dc, rooms);
|
||||
|
||||
prop->pos.x = sp5dc.x;
|
||||
prop->pos.y = sp5dc.y;
|
||||
prop->pos.z = sp5dc.z;
|
||||
prop->pos = sp5dc;
|
||||
|
||||
propDeregisterRooms(prop);
|
||||
roomsCopy(rooms, prop->rooms);
|
||||
@@ -8020,9 +7952,7 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
||||
#endif
|
||||
{
|
||||
sp354 = true;
|
||||
sp5f4.x = sp380.x;
|
||||
sp5f4.y = sp380.y;
|
||||
sp5f4.z = sp380.z;
|
||||
sp5f4 = sp380;
|
||||
|
||||
guNormalize(&sp5f4.x, &sp5f4.y, &sp5f4.z);
|
||||
|
||||
@@ -8049,9 +7979,7 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
||||
}
|
||||
|
||||
if (projectile->flags & PROJECTILEFLAG_INROOM) {
|
||||
prop->pos.x = sp5c8.x;
|
||||
prop->pos.y = sp5c8.y;
|
||||
prop->pos.z = sp5c8.z;
|
||||
prop->pos = sp5c8;
|
||||
|
||||
propDeregisterRooms(prop);
|
||||
roomsCopy(sp5b8, prop->rooms);
|
||||
@@ -8173,9 +8101,7 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
||||
} else {
|
||||
struct coord smokepos;
|
||||
|
||||
smokepos.x = projectile->speed.x;
|
||||
smokepos.y = projectile->speed.y;
|
||||
smokepos.z = projectile->speed.z;
|
||||
smokepos = projectile->speed;
|
||||
|
||||
guNormalize(&smokepos.x, &smokepos.y, &smokepos.z);
|
||||
|
||||
@@ -8299,9 +8225,7 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
||||
}
|
||||
}
|
||||
|
||||
sp5c8.x = prop->pos.x;
|
||||
sp5c8.y = prop->pos.y;
|
||||
sp5c8.z = prop->pos.z;
|
||||
sp5c8 = prop->pos;
|
||||
|
||||
roomsCopy(prop->rooms, sp5b8);
|
||||
func0f06d37c(obj, &sp5dc, &sp5e8, &sp5f4);
|
||||
@@ -8718,9 +8642,7 @@ void platformDisplaceProps(struct prop *platform, s16 *propnums, struct coord *p
|
||||
|
||||
func0f065e74(&prop->pos, prop->rooms, &sp78, sp68);
|
||||
|
||||
prop->pos.x = sp78.x;
|
||||
prop->pos.y = sp78.y;
|
||||
prop->pos.z = sp78.z;
|
||||
prop->pos = sp78;
|
||||
|
||||
propDeregisterRooms(prop);
|
||||
roomsCopy(sp68, prop->rooms);
|
||||
@@ -8800,9 +8722,7 @@ void liftTick(struct prop *prop)
|
||||
s16 propnums[256];
|
||||
s32 stop;
|
||||
|
||||
lift->prevpos.x = prop->pos.x;
|
||||
lift->prevpos.y = prop->pos.y;
|
||||
lift->prevpos.z = prop->pos.z;
|
||||
lift->prevpos = prop->pos;
|
||||
|
||||
if (lift->levelcur != lift->levelaim) {
|
||||
// Lift is not at the desired level. So try to move, but not if the lift
|
||||
@@ -8817,9 +8737,7 @@ void liftTick(struct prop *prop)
|
||||
}
|
||||
|
||||
if (move) {
|
||||
prevpos.x = prop->pos.x;
|
||||
prevpos.y = prop->pos.y;
|
||||
prevpos.z = prop->pos.z;
|
||||
prevpos = prop->pos;
|
||||
|
||||
cdGetPropsOnPlatform(prop, propnums, ARRAYCOUNT(propnums));
|
||||
|
||||
@@ -8892,9 +8810,7 @@ void liftTick(struct prop *prop)
|
||||
|
||||
func0f065e74(&prop->pos, prop->rooms, &newpos, newrooms);
|
||||
|
||||
prop->pos.x = newpos.x;
|
||||
prop->pos.y = newpos.y;
|
||||
prop->pos.z = newpos.z;
|
||||
prop->pos = newpos;
|
||||
|
||||
propDeregisterRooms(prop);
|
||||
roomsCopy(newrooms, prop->rooms);
|
||||
@@ -8955,24 +8871,18 @@ void escastepTick(struct prop *prop)
|
||||
}
|
||||
|
||||
if (!resetting) {
|
||||
oldpos.x = prop->pos.x;
|
||||
oldpos.y = prop->pos.y;
|
||||
oldpos.z = prop->pos.z;
|
||||
oldpos = prop->pos;
|
||||
|
||||
cdGetPropsOnPlatform(prop, propnums, ARRAYCOUNT(propnums));
|
||||
|
||||
step->prevpos.x = prop->pos.x;
|
||||
step->prevpos.y = prop->pos.y;
|
||||
step->prevpos.z = prop->pos.z;
|
||||
step->prevpos = prop->pos;
|
||||
} else {
|
||||
step->prevpos.x = newpos.f[0];
|
||||
step->prevpos.y = newpos.f[1];
|
||||
step->prevpos.z = newpos.f[2];
|
||||
}
|
||||
|
||||
prop->pos.x = newpos.x;
|
||||
prop->pos.y = newpos.y;
|
||||
prop->pos.z = newpos.z;
|
||||
prop->pos = newpos;
|
||||
|
||||
if ((obj->flags & OBJFLAG_IGNOREFLOORCOLOUR) == 0) {
|
||||
cdFindFloorYColourTypeAtPos(&prop->pos, prop->rooms, &obj->floorcol, 0);
|
||||
@@ -9197,9 +9107,7 @@ void cctvInitMatrices(struct prop *prop, Mtxf *mtx)
|
||||
mtx4LoadYRotation(yrot, &sp24);
|
||||
mtx4MultMtx4(&sp24, &cctv->camrotm, &matrices[1]);
|
||||
|
||||
sp64.x = rodata->position.pos.x;
|
||||
sp64.y = rodata->position.pos.y;
|
||||
sp64.z = rodata->position.pos.z;
|
||||
sp64 = rodata->position.pos;
|
||||
|
||||
mtx4TransformVecInPlace(mtx, &sp64);
|
||||
mtx4SetTranslation(&sp64, &matrices[1]);
|
||||
@@ -9748,9 +9656,7 @@ void autogunInitMatrices(struct prop *prop, Mtxf *mtx)
|
||||
|
||||
rodata = modelGetPartRodata(model->filedata, MODELPART_AUTOGUN_0001);
|
||||
|
||||
sp4c.x = rodata->position.pos.x;
|
||||
sp4c.y = rodata->position.pos.y;
|
||||
sp4c.z = rodata->position.pos.z;
|
||||
sp4c = rodata->position.pos;
|
||||
|
||||
mtx4TransformVecInPlace(mtx, &sp4c);
|
||||
mtx4LoadYRotation(yrot, &matrices[1]);
|
||||
@@ -9869,9 +9775,7 @@ void autogunTickShoot(struct prop *autogunprop)
|
||||
sp108 = model0001a5cc(model, flashnode, 0);
|
||||
rodata = flashnode->rodata;
|
||||
|
||||
gunpos.x = rodata->chrgunfire.pos.x;
|
||||
gunpos.y = rodata->chrgunfire.pos.y;
|
||||
gunpos.z = rodata->chrgunfire.pos.z;
|
||||
gunpos = rodata->chrgunfire.pos;
|
||||
} else {
|
||||
sp108 = model0001a5cc(model, posnode, 0);
|
||||
|
||||
@@ -9884,16 +9788,12 @@ void autogunTickShoot(struct prop *autogunprop)
|
||||
mtx4TransformVecInPlace(&spc8, &gunpos);
|
||||
|
||||
if (cdTestLos10(&autogunprop->pos, autogunprop->rooms, &gunpos, gunrooms, CDTYPE_BG, GEOFLAG_BLOCK_SHOOT) == CDRESULT_COLLISION) {
|
||||
gunpos.x = autogunprop->pos.x;
|
||||
gunpos.y = autogunprop->pos.y;
|
||||
gunpos.z = autogunprop->pos.z;
|
||||
gunpos = autogunprop->pos;
|
||||
|
||||
roomsCopy(autogunprop->rooms, gunrooms);
|
||||
}
|
||||
} else {
|
||||
gunpos.x = autogunprop->pos.x;
|
||||
gunpos.y = autogunprop->pos.y;
|
||||
gunpos.z = autogunprop->pos.z;
|
||||
gunpos = autogunprop->pos;
|
||||
|
||||
roomsCopy(autogunprop->rooms, gunrooms);
|
||||
}
|
||||
@@ -10052,9 +9952,7 @@ void autogunTickShoot(struct prop *autogunprop)
|
||||
autogun->shotbondsum += increment;
|
||||
|
||||
if (autogun->shotbondsum >= 1.0f) {
|
||||
hitpos.x = targetprop->pos.x;
|
||||
hitpos.y = targetprop->pos.y;
|
||||
hitpos.z = targetprop->pos.z;
|
||||
hitpos = targetprop->pos;
|
||||
|
||||
missed = false;
|
||||
|
||||
@@ -10111,9 +10009,7 @@ void autogunTickShoot(struct prop *autogunprop)
|
||||
distance = sqrtf(sum);
|
||||
|
||||
if (distance > 0.0f) {
|
||||
beam->from.x = gunpos.x;
|
||||
beam->from.y = gunpos.y;
|
||||
beam->from.z = gunpos.z;
|
||||
beam->from = gunpos;
|
||||
|
||||
beam->dir.x = dist.f[0];
|
||||
beam->dir.y = dist.f[1];
|
||||
@@ -10748,9 +10644,7 @@ void chopperIncrementMovement(struct prop *prop, f32 goalroty, f32 goalrotx, str
|
||||
|
||||
func0f065e74(&prop->pos, prop->rooms, &newpos, newrooms);
|
||||
|
||||
prop->pos.x = newpos.x;
|
||||
prop->pos.y = newpos.y;
|
||||
prop->pos.z = newpos.z;
|
||||
prop->pos = newpos;
|
||||
|
||||
propDeregisterRooms(prop);
|
||||
roomsCopy(newrooms, prop->rooms);
|
||||
@@ -10908,9 +10802,7 @@ void chopperTickFall(struct prop *chopperprop)
|
||||
|
||||
func0f065e74(&chopperprop->pos, chopperprop->rooms, &newpos, newrooms);
|
||||
|
||||
chopperprop->pos.x = newpos.x;
|
||||
chopperprop->pos.y = newpos.y;
|
||||
chopperprop->pos.z = newpos.z;
|
||||
chopperprop->pos = newpos;
|
||||
|
||||
propDeregisterRooms(chopperprop);
|
||||
roomsCopy(newrooms, chopperprop->rooms);
|
||||
@@ -11058,9 +10950,7 @@ void chopperTickCombat(struct prop *chopperprop)
|
||||
// Stay put
|
||||
osSyncPrintf("HC: %x - visible\n", chopper);
|
||||
|
||||
goalpos.x = chopperprop->pos.x;
|
||||
goalpos.y = chopperprop->pos.y;
|
||||
goalpos.z = chopperprop->pos.z;
|
||||
goalpos = chopperprop->pos;
|
||||
} else {
|
||||
f20 = 2.6843546e8f;
|
||||
|
||||
@@ -11076,16 +10966,12 @@ void chopperTickCombat(struct prop *chopperprop)
|
||||
if (f0 < f20) {
|
||||
f20 = f0;
|
||||
sp90 = i;
|
||||
goalpos.x = sp78.x;
|
||||
goalpos.y = sp78.y;
|
||||
goalpos.z = sp78.z;
|
||||
goalpos = sp78;
|
||||
}
|
||||
|
||||
if ((chopper->cw ? i : (i + 1) % chopper->path->len) == chopper->nextstep) {
|
||||
sp8c = i;
|
||||
sp6c.x = sp78.x;
|
||||
sp6c.y = sp78.y;
|
||||
sp6c.z = sp78.z;
|
||||
sp6c = sp78;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11119,13 +11005,9 @@ void chopperTickCombat(struct prop *chopperprop)
|
||||
padpos.y += -250.0f;
|
||||
}
|
||||
|
||||
goalpos.x = padpos.x;
|
||||
goalpos.y = padpos.y;
|
||||
goalpos.z = padpos.z;
|
||||
goalpos = padpos;
|
||||
} else {
|
||||
goalpos.x = sp6c.x;
|
||||
goalpos.y = sp6c.y;
|
||||
goalpos.z = sp6c.z;
|
||||
goalpos = sp6c;
|
||||
}
|
||||
} else if (cdTestLos03(&targetprop->pos, targetprop->rooms, &goalpos, CDTYPE_OBJS | CDTYPE_DOORS | CDTYPE_PATHBLOCKER | CDTYPE_BG | CDTYPE_AIOPAQUE, GEOFLAG_BLOCK_SHOOT) == 0) {
|
||||
padpos = g_Pads[chopper->path->pads[chopper->cw ? (sp8c + 1) % chopper->path->len : sp8c]].pos;
|
||||
@@ -11269,9 +11151,7 @@ void hovercarTick(struct prop *prop)
|
||||
|
||||
func0f065e74(&prop->pos, prop->rooms, &sp1c0, sp1b0);
|
||||
|
||||
prop->pos.x = sp1c0.x;
|
||||
prop->pos.y = sp1c0.y;
|
||||
prop->pos.z = sp1c0.z;
|
||||
prop->pos = sp1c0;
|
||||
|
||||
propDeregisterRooms(prop);
|
||||
roomsCopy(sp1b0, prop->rooms);
|
||||
@@ -11470,9 +11350,7 @@ void hovercarTick(struct prop *prop)
|
||||
#endif
|
||||
}
|
||||
|
||||
prop->pos.x = sp150.x;
|
||||
prop->pos.y = sp150.y;
|
||||
prop->pos.z = sp150.z;
|
||||
prop->pos = sp150;
|
||||
|
||||
propDeregisterRooms(prop);
|
||||
roomsCopy(sp140, prop->rooms);
|
||||
@@ -11883,9 +11761,7 @@ s32 objTickPlayer(struct prop *prop)
|
||||
func0f065e74(&prop->pos, prop->rooms, &sp400, sp384);
|
||||
}
|
||||
|
||||
prop->pos.x = sp400.x;
|
||||
prop->pos.y = sp400.y;
|
||||
prop->pos.z = sp400.z;
|
||||
prop->pos = sp400;
|
||||
|
||||
propDeregisterRooms(prop);
|
||||
roomsCopy(sp384, prop->rooms);
|
||||
@@ -14945,9 +14821,7 @@ void objBounce(struct defaultobj *obj, struct coord *arg1)
|
||||
|
||||
projectile->flags |= PROJECTILEFLAG_AIRBORNE;
|
||||
|
||||
dir.x = arg1->x;
|
||||
dir.y = arg1->y;
|
||||
dir.z = arg1->z;
|
||||
dir = *arg1;
|
||||
|
||||
mtx4RotateVecInPlace(camGetProjectionMtxF(), &dir);
|
||||
|
||||
@@ -15005,9 +14879,7 @@ void objApplyMomentum(struct defaultobj *obj, struct coord *speed, f32 rotation,
|
||||
projectile->speed.y += speed->y;
|
||||
projectile->speed.z += speed->z;
|
||||
} else {
|
||||
projectile->speed.x = speed->x;
|
||||
projectile->speed.y = speed->y;
|
||||
projectile->speed.z = speed->z;
|
||||
projectile->speed = *speed;
|
||||
}
|
||||
|
||||
if (addrotation) {
|
||||
@@ -15647,15 +15519,11 @@ bool func0f084594(struct model *model, struct modelnode *node, struct coord *arg
|
||||
mtxindex = model0001a524(node, 0);
|
||||
mtx000172f0(model->matrices[mtxindex].m, mtx.m);
|
||||
|
||||
spb8.x = arg2->x;
|
||||
spb8.y = arg2->y;
|
||||
spb8.z = arg2->z;
|
||||
spb8 = *arg2;
|
||||
|
||||
mtx4TransformVecInPlace(&mtx, &spb8);
|
||||
|
||||
spac.x = arg3->x;
|
||||
spac.y = arg3->y;
|
||||
spac.z = arg3->z;
|
||||
spac = *arg3;
|
||||
|
||||
mtx4RotateVecInPlace(&mtx, &spac);
|
||||
|
||||
@@ -15841,15 +15709,11 @@ bool func0f0849dc(struct model *model, struct modelnode *nodearg, struct coord *
|
||||
|
||||
mtx000172f0(mtx->m, sp64.m);
|
||||
|
||||
spec.x = arg2->x;
|
||||
spec.y = arg2->y;
|
||||
spec.z = arg2->z;
|
||||
spec = *arg2;
|
||||
|
||||
mtx4TransformVecInPlace(&sp64, &spec);
|
||||
|
||||
spd4.x = arg3->x;
|
||||
spd4.y = arg3->y;
|
||||
spd4.z = arg3->z;
|
||||
spd4 = *arg3;
|
||||
|
||||
mtx4RotateVecInPlace(&sp64, &spd4);
|
||||
|
||||
@@ -16684,9 +16548,7 @@ void objHit(struct shotdata *shotdata, struct hit *hit)
|
||||
mtx4MultMtx4(camGetProjectionMtxF(), &obj->model->matrices[hit->mtxindex], &sp58);
|
||||
mtx4TransformVec(&sp58, &hit->hitthing.unk00, &spa4);
|
||||
|
||||
pushdir.x = shotdata->dir.x;
|
||||
pushdir.y = shotdata->dir.y;
|
||||
pushdir.z = shotdata->dir.z;
|
||||
pushdir = shotdata->dir;
|
||||
|
||||
func0f082e84(obj, &spa4, &pushdir, &spb0, true);
|
||||
} else {
|
||||
@@ -20136,14 +19998,10 @@ struct prop *doorInit(struct doorobj *door, struct coord *pos, Mtxf *mtx, s16 *r
|
||||
door->mode = DOORMODE_IDLE;
|
||||
door->glasshits = 0;
|
||||
door->portalnum = -1;
|
||||
door->startpos.x = centre->x;
|
||||
door->startpos.y = centre->y;
|
||||
door->startpos.z = centre->z;
|
||||
door->startpos = *centre;
|
||||
|
||||
if (door->doorflags & DOORFLAG_0080) {
|
||||
door->unk98.x = coord->x;
|
||||
door->unk98.y = coord->y;
|
||||
door->unk98.z = coord->z;
|
||||
door->unk98 = *coord;
|
||||
|
||||
if (door->doorflags & DOORFLAG_0004) {
|
||||
struct modelnode *node = func0f0687e4(door->base.model);
|
||||
@@ -20160,9 +20018,7 @@ struct prop *doorInit(struct doorobj *door, struct coord *pos, Mtxf *mtx, s16 *r
|
||||
|
||||
prop->type = PROPTYPE_DOOR;
|
||||
prop->door = door;
|
||||
prop->pos.x = centre->x;
|
||||
prop->pos.y = centre->y;
|
||||
prop->pos.z = centre->z;
|
||||
prop->pos = *centre;
|
||||
|
||||
propDeregisterRooms(prop);
|
||||
roomsCopy(sp28, prop->rooms);
|
||||
@@ -21523,9 +21379,7 @@ void gasReleaseFromPos(struct coord *pos)
|
||||
g_GasReleasing = true;
|
||||
g_GasSoundTimer240 = 0;
|
||||
|
||||
g_GasPos.x = pos->x;
|
||||
g_GasPos.y = pos->y;
|
||||
g_GasPos.z = pos->z;
|
||||
g_GasPos = *pos;
|
||||
|
||||
// Gas objects don't exist in PD, so this stage number was likely carried
|
||||
// over from GoldenEye. It maps to GE's Egypt stage, which uses gas for a
|
||||
@@ -21924,9 +21778,7 @@ void projectileCreate(struct prop *fromprop, struct fireslotthing *arg1, struct
|
||||
u8 drug = false;
|
||||
u32 stack3;
|
||||
|
||||
frompos.x = pos->x;
|
||||
frompos.y = pos->y;
|
||||
frompos.z = pos->z;
|
||||
frompos = *pos;
|
||||
|
||||
if (weaponnum == WEAPON_TRANQUILIZER) {
|
||||
forcebeam = true;
|
||||
@@ -22067,9 +21919,7 @@ void projectileCreate(struct prop *fromprop, struct fireslotthing *arg1, struct
|
||||
if (arg1->unk14 >= 1.0f) {
|
||||
blocked = false;
|
||||
|
||||
endpos.x = targetprop->pos.x;
|
||||
endpos.y = targetprop->pos.y;
|
||||
endpos.z = targetprop->pos.z;
|
||||
endpos = targetprop->pos;
|
||||
|
||||
if (random() % 2) {
|
||||
endpos.y += (random() % 10) + 2;
|
||||
|
||||
+1
-3
@@ -4054,9 +4054,7 @@ s16 propsnd0f0939f8(
|
||||
#endif
|
||||
|
||||
if (pos) {
|
||||
channel->pos.x = pos->x;
|
||||
channel->pos.y = pos->y;
|
||||
channel->pos.z = pos->z;
|
||||
channel->pos = *pos;
|
||||
channel->posptr = &channel->pos;
|
||||
} else {
|
||||
channel->posptr = NULL;
|
||||
|
||||
+1
-3
@@ -134,7 +134,5 @@ struct coord *roomGetPos(s32 room)
|
||||
|
||||
void room0f166df0(s32 room, struct coord *globaldrawworldoffset)
|
||||
{
|
||||
globaldrawworldoffset->x = g_BgRooms[room].pos.x;
|
||||
globaldrawworldoffset->y = g_BgRooms[room].pos.y;
|
||||
globaldrawworldoffset->z = g_BgRooms[room].pos.z;
|
||||
*globaldrawworldoffset = g_BgRooms[room].pos;
|
||||
}
|
||||
|
||||
+7
-21
@@ -448,22 +448,16 @@ void setupCreateObject(struct defaultobj *obj, s32 cmdindex)
|
||||
if (pad->room > 0) {
|
||||
mtx00016d58(&mtx, 0, 0, 0, -pad->look.x, -pad->look.y, -pad->look.z, pad->up.x, pad->up.y, pad->up.z);
|
||||
|
||||
pos.x = pad->pos.x;
|
||||
pos.y = pad->pos.y;
|
||||
pos.z = pad->pos.z;
|
||||
pos = pad->pos;
|
||||
|
||||
rooms[0] = pad->room;
|
||||
rooms[1] = -1;
|
||||
|
||||
if (!padHasBboxData(obj->pad)) {
|
||||
if (obj->flags & OBJFLAG_00000002) {
|
||||
centre.x = pad->pos.x;
|
||||
centre.y = pad->pos.y;
|
||||
centre.z = pad->pos.z;
|
||||
centre = pad->pos;
|
||||
} else {
|
||||
centre.x = pad->pos.x;
|
||||
centre.y = pad->pos.y;
|
||||
centre.z = pad->pos.z;
|
||||
centre = pad->pos;
|
||||
}
|
||||
} else {
|
||||
padGetCentre(obj->pad, ¢re);
|
||||
@@ -806,9 +800,7 @@ void setupCreateCctv(struct cctvobj *cctv, s32 cmdindex)
|
||||
|
||||
pad = &g_Pads[cctv->lookatpadnum];
|
||||
|
||||
lenspos.x = lens->position.pos.x;
|
||||
lenspos.y = lens->position.pos.y;
|
||||
lenspos.z = lens->position.pos.z;
|
||||
lenspos = lens->position.pos;
|
||||
|
||||
mtx00016208(obj->realrot, &lenspos);
|
||||
|
||||
@@ -1120,9 +1112,7 @@ void setupCreateDoor(struct doorobj *door, s32 cmdindex)
|
||||
mtx00015e80(yscale, &finalmtx);
|
||||
mtx00015edc(zscale, &finalmtx);
|
||||
|
||||
pos.x = pad->pos.x;
|
||||
pos.y = pad->pos.y;
|
||||
pos.z = pad->pos.z;
|
||||
pos = pad->pos;
|
||||
|
||||
rooms[0] = pad->room;
|
||||
rooms[1] = -1;
|
||||
@@ -1679,9 +1669,7 @@ void setupCreateProps(s32 stagenum)
|
||||
prop = obj->prop;
|
||||
|
||||
if (prop) {
|
||||
lift->prevpos.x = prop->pos.x;
|
||||
lift->prevpos.y = prop->pos.y;
|
||||
lift->prevpos.z = prop->pos.z;
|
||||
lift->prevpos = prop->pos;
|
||||
|
||||
liftUpdateTiles(lift, true);
|
||||
}
|
||||
@@ -1756,9 +1744,7 @@ void setupCreateProps(s32 stagenum)
|
||||
prop = obj->prop;
|
||||
|
||||
if (prop) {
|
||||
step->prevpos.x = prop->pos.x;
|
||||
step->prevpos.y = prop->pos.y;
|
||||
step->prevpos.z = prop->pos.z;
|
||||
step->prevpos = prop->pos;
|
||||
}
|
||||
|
||||
if (obj->flags & OBJFLAG_ESCSTEP_ZALIGNED) {
|
||||
|
||||
+1
-3
@@ -122,9 +122,7 @@ void shardCreate(s16 room, struct coord *pos, f32 rotx, f32 size, s32 type)
|
||||
g_Shards[g_NextShardNum].room = room;
|
||||
g_Shards[g_NextShardNum].age60 = 1;
|
||||
|
||||
g_Shards[g_NextShardNum].pos.x = pos->x;
|
||||
g_Shards[g_NextShardNum].pos.y = pos->y;
|
||||
g_Shards[g_NextShardNum].pos.z = pos->z;
|
||||
g_Shards[g_NextShardNum].pos = *pos;
|
||||
|
||||
g_Shards[g_NextShardNum].vel.x = velx * PALUPF(1.5f);
|
||||
g_Shards[g_NextShardNum].vel.y = vely * PALUPF(3.0f);
|
||||
|
||||
+3
-9
@@ -2823,15 +2823,9 @@ Gfx *sky0f126de8(Gfx *gdl)
|
||||
|
||||
pad = &g_Pads[g_Vars.currentplayer->teleportpad];
|
||||
|
||||
g_TeleportToPos.x = pad->pos.x;
|
||||
g_TeleportToPos.y = pad->pos.y;
|
||||
g_TeleportToPos.z = pad->pos.z;
|
||||
g_TeleportToLook.x = pad->look.x;
|
||||
g_TeleportToLook.y = pad->look.y;
|
||||
g_TeleportToLook.z = pad->look.z;
|
||||
g_TeleportToUp.x = pad->up.x;
|
||||
g_TeleportToUp.y = pad->up.y;
|
||||
g_TeleportToUp.z = pad->up.z;
|
||||
g_TeleportToPos = pad->pos;
|
||||
g_TeleportToLook = pad->look;
|
||||
g_TeleportToUp = pad->up;
|
||||
|
||||
f22 = -cosf(f22 * M_PI) * 0.5f + .5f;
|
||||
f24 = 100 * f22;
|
||||
|
||||
+4
-12
@@ -304,9 +304,7 @@ struct smoke *smokeCreate(struct coord *pos, s16 *rooms, s16 type)
|
||||
if (prop) {
|
||||
prop->type = PROPTYPE_SMOKE;
|
||||
prop->smoke = smoke;
|
||||
prop->pos.x = pos->x;
|
||||
prop->pos.y = pos->y;
|
||||
prop->pos.z = pos->z;
|
||||
prop->pos = *pos;
|
||||
|
||||
for (i = 0; rooms[i] != -1 && i < 7; i++) {
|
||||
prop->rooms[i] = rooms[i];
|
||||
@@ -505,17 +503,11 @@ u32 smokeTick(struct prop *prop)
|
||||
part->deltarot = (0.5f - RANDOMFRAC()) * g_SmokeTypes[smoke->type].bgrotatespeed;
|
||||
|
||||
if (smoke->type >= SMOKETYPE_MUZZLE_PISTOL && smoke->type <= SMOKETYPE_MUZZLE_SHOTGUN) {
|
||||
part->pos.x = g_Vars.currentplayer->hands[smoke->option].muzzlepos.x;
|
||||
part->pos.y = g_Vars.currentplayer->hands[smoke->option].muzzlepos.y;
|
||||
part->pos.z = g_Vars.currentplayer->hands[smoke->option].muzzlepos.z;
|
||||
part->pos = g_Vars.currentplayer->hands[smoke->option].muzzlepos;
|
||||
} else if (smoke->sourceprop && smoke->option == 0) {
|
||||
part->pos.x = smoke->sourceprop->pos.x;
|
||||
part->pos.y = smoke->sourceprop->pos.y;
|
||||
part->pos.z = smoke->sourceprop->pos.z;
|
||||
part->pos = smoke->sourceprop->pos;
|
||||
} else {
|
||||
part->pos.x = prop->pos.x;
|
||||
part->pos.y = prop->pos.y;
|
||||
part->pos.z = prop->pos.z;
|
||||
part->pos = prop->pos;
|
||||
}
|
||||
|
||||
if (smoke->type == SMOKETYPE_WATER) {
|
||||
|
||||
+1
-3
@@ -264,9 +264,7 @@ void sparksCreate(s32 room, struct prop *prop, struct coord *pos, struct coord *
|
||||
group->age = 1;
|
||||
group->startindex = g_NextSparkIndex;
|
||||
group->numsparks = type->numsparks;
|
||||
group->pos.x = pos->x;
|
||||
group->pos.y = pos->y;
|
||||
group->pos.z = pos->z;
|
||||
group->pos = *pos;
|
||||
group->room = room;
|
||||
group->prop = prop;
|
||||
|
||||
|
||||
+2
-6
@@ -224,9 +224,7 @@ s32 splatsCreate(s32 qty, f32 arg1, struct prop *prop, struct shotdata *shotdata
|
||||
struct chrdata *chr = prop->chr;
|
||||
|
||||
chr->tickssincesplat = 0;
|
||||
chr->lastdroppos.x = prop->pos.x;
|
||||
chr->lastdroppos.y = prop->pos.y;
|
||||
chr->lastdroppos.z = prop->pos.z;
|
||||
chr->lastdroppos = prop->pos;
|
||||
}
|
||||
|
||||
return numdropped;
|
||||
@@ -286,9 +284,7 @@ bool splat0f149274(f32 arg0, struct prop *chrprop, struct shotdata *shotdata, f3
|
||||
bestroom = rooms[i];
|
||||
besthitthing = hitthing;
|
||||
|
||||
endpos.x = hitthing.unk00.x;
|
||||
endpos.y = hitthing.unk00.y;
|
||||
endpos.z = hitthing.unk00.z;
|
||||
endpos = hitthing.unk00;
|
||||
|
||||
hasresult = true;
|
||||
break;
|
||||
|
||||
+6
-18
@@ -521,9 +521,7 @@ void frInitDefaults(void)
|
||||
g_FrData.speed = 1;
|
||||
|
||||
for (i = 0; i < ARRAYCOUNT(g_FrData.targets); i++) {
|
||||
g_FrData.targets[i].dstpos.x = pad->pos.x;
|
||||
g_FrData.targets[i].dstpos.y = pad->pos.y;
|
||||
g_FrData.targets[i].dstpos.z = pad->pos.z;
|
||||
g_FrData.targets[i].dstpos = pad->pos;
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
g_FrData.targets[i].dstpos.z += 6.0f * i;
|
||||
@@ -878,9 +876,7 @@ bool frExecuteTargetScript(s32 targetnum)
|
||||
|
||||
g_FrData.targets[targetnum].frpadnum = frpadnum;
|
||||
|
||||
g_FrData.targets[targetnum].dstpos.x = g_Pads[g_FrPads[frpadnum]].pos.x;
|
||||
g_FrData.targets[targetnum].dstpos.y = g_Pads[g_FrPads[frpadnum]].pos.y;
|
||||
g_FrData.targets[targetnum].dstpos.z = g_Pads[g_FrPads[frpadnum]].pos.z;
|
||||
g_FrData.targets[targetnum].dstpos = g_Pads[g_FrPads[frpadnum]].pos;
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
g_FrData.targets[targetnum].dstpos.z += 6.0f * targetnum;
|
||||
@@ -997,9 +993,7 @@ void frInitTargets(void)
|
||||
frExecuteTargetScript(i);
|
||||
|
||||
if (g_FrData.targets[i].travelspeed == -1) {
|
||||
pos.x = g_FrData.targets[i].dstpos.x;
|
||||
pos.y = g_FrData.targets[i].dstpos.y;
|
||||
pos.z = g_FrData.targets[i].dstpos.z;
|
||||
pos = g_FrData.targets[i].dstpos;
|
||||
}
|
||||
|
||||
count++;
|
||||
@@ -1024,9 +1018,7 @@ void frInitTargets(void)
|
||||
mtx4ToMtx3(&sp144, sp108);
|
||||
mtx3Copy(sp108, obj->realrot);
|
||||
|
||||
prop->pos.x = pos.x;
|
||||
prop->pos.y = pos.y;
|
||||
prop->pos.z = pos.z;
|
||||
prop->pos = pos;
|
||||
|
||||
func0f069c70(obj, true, false);
|
||||
}
|
||||
@@ -2026,9 +2018,7 @@ void frTick(void)
|
||||
#endif
|
||||
{
|
||||
// Target is stopping
|
||||
newpos.x = g_FrData.targets[i].dstpos.x;
|
||||
newpos.y = g_FrData.targets[i].dstpos.y;
|
||||
newpos.z = g_FrData.targets[i].dstpos.z;
|
||||
newpos = g_FrData.targets[i].dstpos;
|
||||
|
||||
g_FrData.targets[i].scriptenabled = true;
|
||||
g_FrData.targets[i].travelling = false;
|
||||
@@ -2048,9 +2038,7 @@ void frTick(void)
|
||||
}
|
||||
}
|
||||
|
||||
prop->pos.x = newpos.x;
|
||||
prop->pos.y = newpos.y;
|
||||
prop->pos.z = newpos.z;
|
||||
prop->pos = newpos;
|
||||
|
||||
func0f069c70(obj, true, false);
|
||||
}
|
||||
|
||||
+2
-6
@@ -163,9 +163,7 @@ void func0f1770ac(struct coord *a, struct coord *b, struct coord *out)
|
||||
|
||||
void func0f177120(struct coord *in, struct coord *out)
|
||||
{
|
||||
out->x = in->x;
|
||||
out->y = in->y;
|
||||
out->z = in->z;
|
||||
*out = *in;
|
||||
}
|
||||
|
||||
void func0f17713c(struct coord *in, struct coord *out)
|
||||
@@ -181,9 +179,7 @@ bool func0f177164(struct coord *arg0, struct coord *arg1, u32 line, char *file)
|
||||
f32 mult;
|
||||
|
||||
if (sqdist < var800845d4) {
|
||||
arg0->x = var800845f4.x;
|
||||
arg0->y = var800845f4.y;
|
||||
arg0->z = var800845f4.z;
|
||||
*arg0 = var800845f4;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
+8
-24
@@ -1309,9 +1309,7 @@ void wallhitCreateWith20Args(struct coord *relpos, struct coord *arg1, struct co
|
||||
u32 range;
|
||||
struct coord sp100;
|
||||
|
||||
sp1b8.x = arg1->x;
|
||||
sp1b8.y = arg1->y;
|
||||
sp1b8.z = arg1->z;
|
||||
sp1b8 = *arg1;
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
func0f177164(&sp1b8, &sp1b8, 956, "wallhit.c");
|
||||
@@ -1507,13 +1505,9 @@ void wallhitCreateWith20Args(struct coord *relpos, struct coord *arg1, struct co
|
||||
|
||||
func0f1770ac(&sp13c, &sp118, &sp100);
|
||||
|
||||
sp1f4.x = sp13c.x;
|
||||
sp1f4.y = sp13c.y;
|
||||
sp1f4.z = sp13c.z;
|
||||
sp1f4 = sp13c;
|
||||
|
||||
sp1e8.x = sp118.x;
|
||||
sp1e8.y = sp118.y;
|
||||
sp1e8.z = sp118.z;
|
||||
sp1e8 = sp118;
|
||||
} else {
|
||||
f32 f0 = sqrtf(sp1b8.x * sp1b8.x + sp1b8.z * sp1b8.z);
|
||||
f32 xvalue = sp1b8.x / f0;
|
||||
@@ -1545,13 +1539,9 @@ void wallhitCreateWith20Args(struct coord *relpos, struct coord *arg1, struct co
|
||||
sp1d0.y = -spd0 * sp1f4.y + spcc * sp1e8.y;
|
||||
sp1d0.z = -spd0 * sp1f4.z + spcc * sp1e8.z;
|
||||
} else {
|
||||
sp1dc.x = sp1f4.x;
|
||||
sp1dc.y = sp1f4.y;
|
||||
sp1dc.z = sp1f4.z;
|
||||
sp1dc = sp1f4;
|
||||
|
||||
sp1d0.x = sp1e8.x;
|
||||
sp1d0.y = sp1e8.y;
|
||||
sp1d0.z = sp1e8.z;
|
||||
sp1d0 = sp1e8;
|
||||
}
|
||||
|
||||
if (objprop) {
|
||||
@@ -1567,13 +1557,9 @@ void wallhitCreateWith20Args(struct coord *relpos, struct coord *arg1, struct co
|
||||
sp1d0.z = -1.0f * sp1d0.z;
|
||||
}
|
||||
|
||||
sp84.x = sp1dc.x;
|
||||
sp84.y = sp1dc.y;
|
||||
sp84.z = sp1dc.z;
|
||||
sp84 = sp1dc;
|
||||
|
||||
sp78.x = sp1d0.x;
|
||||
sp78.y = sp1d0.y;
|
||||
sp78.z = sp1d0.z;
|
||||
sp78 = sp1d0;
|
||||
|
||||
mtx4RotateVecInPlace(mtx, &sp84);
|
||||
mtx4RotateVecInPlace(mtx, &sp78);
|
||||
@@ -1638,9 +1624,7 @@ void wallhitCreateWith20Args(struct coord *relpos, struct coord *arg1, struct co
|
||||
sp17c[3].y = sp1d0.y - sp1dc.y; \
|
||||
sp17c[3].z = sp1d0.z - sp1dc.z;
|
||||
|
||||
wallhit->relpos.x = relpos->x;
|
||||
wallhit->relpos.y = relpos->y;
|
||||
wallhit->relpos.z = relpos->z;
|
||||
wallhit->relpos = *relpos;
|
||||
|
||||
wallhit->mtxindex = mtxindex;
|
||||
wallhit->unk6f_01 = arg10;
|
||||
|
||||
+44
-132
@@ -59,13 +59,9 @@ f32 cd00024e40(void)
|
||||
|
||||
void cdGetEdge(struct coord *vtx1, struct coord *vtx2, u32 line, char *file)
|
||||
{
|
||||
vtx1->x = g_CdEdgeVtx1.x;
|
||||
vtx1->y = g_CdEdgeVtx1.y;
|
||||
vtx1->z = g_CdEdgeVtx1.z;
|
||||
*vtx1 = g_CdEdgeVtx1;
|
||||
|
||||
vtx2->x = g_CdEdgeVtx2.x;
|
||||
vtx2->y = g_CdEdgeVtx2.y;
|
||||
vtx2->z = g_CdEdgeVtx2.z;
|
||||
*vtx2 = g_CdEdgeVtx2;
|
||||
}
|
||||
|
||||
f32 cd00024e98(void)
|
||||
@@ -85,9 +81,7 @@ struct prop *cdGetObstacleProp(void)
|
||||
|
||||
void cdGetPos(struct coord *pos, u32 line, char *file)
|
||||
{
|
||||
pos->x = g_CdObstaclePos.x;
|
||||
pos->y = g_CdObstaclePos.y;
|
||||
pos->z = g_CdObstaclePos.z;
|
||||
*pos = g_CdObstaclePos;
|
||||
}
|
||||
|
||||
void cdGetObstacleNormal(struct coord *normal)
|
||||
@@ -131,13 +125,9 @@ void cdClearResults(void)
|
||||
|
||||
void cdSetObstacleVtxProp(struct coord *vtx1, struct coord *vtx2, struct prop *prop)
|
||||
{
|
||||
g_CdEdgeVtx1.x = vtx1->x;
|
||||
g_CdEdgeVtx1.y = vtx1->y;
|
||||
g_CdEdgeVtx1.z = vtx1->z;
|
||||
g_CdEdgeVtx1 = *vtx1;
|
||||
|
||||
g_CdEdgeVtx2.x = vtx2->x;
|
||||
g_CdEdgeVtx2.y = vtx2->y;
|
||||
g_CdEdgeVtx2.z = vtx2->z;
|
||||
g_CdEdgeVtx2 = *vtx2;
|
||||
|
||||
var8009a8b4 = 1;
|
||||
var8009a8ac = 0;
|
||||
@@ -153,13 +143,9 @@ void cdSetObstacleVtxPropFlt(struct coord *vtx1, struct coord *vtx2, struct prop
|
||||
{
|
||||
var8009a8b0 = arg3;
|
||||
|
||||
g_CdEdgeVtx1.x = vtx1->x;
|
||||
g_CdEdgeVtx1.y = vtx1->y;
|
||||
g_CdEdgeVtx1.z = vtx1->z;
|
||||
g_CdEdgeVtx1 = *vtx1;
|
||||
|
||||
g_CdEdgeVtx2.x = vtx2->x;
|
||||
g_CdEdgeVtx2.y = vtx2->y;
|
||||
g_CdEdgeVtx2.z = vtx2->z;
|
||||
g_CdEdgeVtx2 = *vtx2;
|
||||
|
||||
var8009a8b4 = 1;
|
||||
var8009a8ac = 1;
|
||||
@@ -209,17 +195,11 @@ void cdSetObstacleProp(struct prop *prop)
|
||||
|
||||
void cdSetObstacleVtxColProp(struct coord *vtxpos1, struct coord *vtxpos2, struct coord *collisionpos, struct prop *prop)
|
||||
{
|
||||
g_CdEdgeVtx1.x = vtxpos1->x;
|
||||
g_CdEdgeVtx1.y = vtxpos1->y;
|
||||
g_CdEdgeVtx1.z = vtxpos1->z;
|
||||
g_CdEdgeVtx1 = *vtxpos1;
|
||||
|
||||
g_CdEdgeVtx2.x = vtxpos2->x;
|
||||
g_CdEdgeVtx2.y = vtxpos2->y;
|
||||
g_CdEdgeVtx2.z = vtxpos2->z;
|
||||
g_CdEdgeVtx2 = *vtxpos2;
|
||||
|
||||
g_CdObstaclePos.x = collisionpos->x;
|
||||
g_CdObstaclePos.y = collisionpos->y;
|
||||
g_CdObstaclePos.z = collisionpos->z;
|
||||
g_CdObstaclePos = *collisionpos;
|
||||
|
||||
var8009a8b4 = 1;
|
||||
var8009a8ac = 0;
|
||||
@@ -233,17 +213,11 @@ void cdSetObstacleVtxColProp(struct coord *vtxpos1, struct coord *vtxpos2, struc
|
||||
|
||||
void cdSetObstacleVtxColPropFltGeo(struct coord *vtxpos1, struct coord *vtxpos2, struct coord *collisionpos, struct prop *prop, f32 arg4, struct geo *geo)
|
||||
{
|
||||
g_CdEdgeVtx1.x = vtxpos1->x;
|
||||
g_CdEdgeVtx1.y = vtxpos1->y;
|
||||
g_CdEdgeVtx1.z = vtxpos1->z;
|
||||
g_CdEdgeVtx1 = *vtxpos1;
|
||||
|
||||
g_CdEdgeVtx2.x = vtxpos2->x;
|
||||
g_CdEdgeVtx2.y = vtxpos2->y;
|
||||
g_CdEdgeVtx2.z = vtxpos2->z;
|
||||
g_CdEdgeVtx2 = *vtxpos2;
|
||||
|
||||
g_CdObstaclePos.x = collisionpos->x;
|
||||
g_CdObstaclePos.y = collisionpos->y;
|
||||
g_CdObstaclePos.z = collisionpos->z;
|
||||
g_CdObstaclePos = *collisionpos;
|
||||
|
||||
var8009a8b4 = 1;
|
||||
var8009a8ac = 0;
|
||||
@@ -259,13 +233,9 @@ void cdSetObstacleVtxColPropFltGeo(struct coord *vtxpos1, struct coord *vtxpos2,
|
||||
|
||||
void cdSetSavedPos(struct coord *pos1, struct coord *pos2)
|
||||
{
|
||||
g_CdPos1.x = pos1->x;
|
||||
g_CdPos1.y = pos1->y;
|
||||
g_CdPos1.z = pos1->z;
|
||||
g_CdPos1 = *pos1;
|
||||
|
||||
g_CdPos2.x = pos2->x;
|
||||
g_CdPos2.y = pos2->y;
|
||||
g_CdPos2.z = pos2->z;
|
||||
g_CdPos2 = *pos2;
|
||||
|
||||
g_CdHasSavedPos = true;
|
||||
}
|
||||
@@ -273,13 +243,9 @@ void cdSetSavedPos(struct coord *pos1, struct coord *pos2)
|
||||
bool cdGetSavedPos(struct coord *pos1, struct coord *pos2)
|
||||
{
|
||||
if (g_CdHasSavedPos) {
|
||||
pos1->x = g_CdPos1.x;
|
||||
pos1->y = g_CdPos1.y;
|
||||
pos1->z = g_CdPos1.z;
|
||||
*pos1 = g_CdPos1;
|
||||
|
||||
pos2->x = g_CdPos2.x;
|
||||
pos2->y = g_CdPos2.y;
|
||||
pos2->z = g_CdPos2.z;
|
||||
*pos2 = g_CdPos2;
|
||||
}
|
||||
|
||||
return g_CdHasSavedPos;
|
||||
@@ -1771,13 +1737,9 @@ void cd0002901c(struct coord *pos, struct coord *dist, f32 width, struct collisi
|
||||
s32 curr = collisions[bestindex].vertexindex;
|
||||
s32 next = (curr + 1) % tile->header.numvertices;
|
||||
|
||||
vtx1.x = tile->vertices[curr].x;
|
||||
vtx1.y = tile->vertices[curr].y;
|
||||
vtx1.z = tile->vertices[curr].z;
|
||||
vtx1 = tile->vertices[curr];
|
||||
|
||||
vtx2.x = tile->vertices[next].x;
|
||||
vtx2.y = tile->vertices[next].y;
|
||||
vtx2.z = tile->vertices[next].z;
|
||||
vtx2 = tile->vertices[next];
|
||||
} else if (collisions[bestindex].geo->type == GEOTYPE_BLOCK) {
|
||||
struct geoblock *block = (struct geoblock *) collisions[bestindex].geo;
|
||||
s32 curr = collisions[bestindex].vertexindex;
|
||||
@@ -3247,13 +3209,9 @@ s32 cdExamCylMove01(struct coord *pos, struct coord *pos2, f32 radius, s16 *room
|
||||
s32 this = collisions[0].vertexindex;
|
||||
s32 next = (this + 1) % collisions[0].geo->numvertices;
|
||||
|
||||
sp70.x = tile->vertices[this].x;
|
||||
sp70.y = tile->vertices[this].y;
|
||||
sp70.z = tile->vertices[this].z;
|
||||
sp70 = tile->vertices[this];
|
||||
|
||||
sp64.x = tile->vertices[next].x;
|
||||
sp64.y = tile->vertices[next].y;
|
||||
sp64.z = tile->vertices[next].z;
|
||||
sp64 = tile->vertices[next];
|
||||
} else if (collisions[0].geo->type == GEOTYPE_BLOCK) {
|
||||
struct geoblock *block = (struct geoblock *) collisions[0].geo;
|
||||
s32 this = collisions[0].vertexindex;
|
||||
@@ -3408,18 +3366,12 @@ bool cd0002ac70IntTile(struct coord *arg0, struct coord *arg1, struct coord *arg
|
||||
} else if (!result && spb8) {
|
||||
result = true;
|
||||
|
||||
arg4->x = arg0->x;
|
||||
arg4->y = arg0->y;
|
||||
arg4->z = arg0->z;
|
||||
*arg4 = *arg0;
|
||||
|
||||
if (arg5 != NULL && arg6 != NULL) {
|
||||
arg5->x = arg0->x;
|
||||
arg5->y = arg0->y;
|
||||
arg5->z = arg0->z;
|
||||
*arg5 = *arg0;
|
||||
|
||||
arg6->x = arg0->x;
|
||||
arg6->y = arg0->y;
|
||||
arg6->z = arg0->z;
|
||||
*arg6 = *arg0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3498,18 +3450,12 @@ bool cd0002b128FltTile(struct coord *arg0, struct coord *arg1, struct coord *arg
|
||||
} else if (!result && spb8) {
|
||||
result = true;
|
||||
|
||||
arg4->x = arg0->x;
|
||||
arg4->y = arg0->y;
|
||||
arg4->z = arg0->z;
|
||||
*arg4 = *arg0;
|
||||
|
||||
if (arg5 != NULL && arg6 != NULL) {
|
||||
arg5->x = arg0->x;
|
||||
arg5->y = arg0->y;
|
||||
arg5->z = arg0->z;
|
||||
*arg5 = *arg0;
|
||||
|
||||
arg6->x = arg0->x;
|
||||
arg6->y = arg0->y;
|
||||
arg6->z = arg0->z;
|
||||
*arg6 = *arg0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3586,18 +3532,12 @@ bool cd0002b560Block(struct coord *arg0, struct coord *arg1, struct coord *arg2,
|
||||
} else if (!result && spb8) {
|
||||
result = true;
|
||||
|
||||
arg4->x = arg0->x;
|
||||
arg4->y = arg0->y;
|
||||
arg4->z = arg0->z;
|
||||
*arg4 = *arg0;
|
||||
|
||||
if (arg5 != NULL && arg6 != NULL) {
|
||||
arg5->x = arg0->x;
|
||||
arg5->y = arg0->y;
|
||||
arg5->z = arg0->z;
|
||||
*arg5 = *arg0;
|
||||
|
||||
arg6->x = arg0->x;
|
||||
arg6->y = arg0->y;
|
||||
arg6->z = arg0->z;
|
||||
*arg6 = *arg0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3959,9 +3899,7 @@ bool cdExamAToBGeolist(u8 *start, u8 *end, struct coord *arg2, struct coord *arg
|
||||
result = true;
|
||||
*arg10 = sum;
|
||||
|
||||
arg11->x = sp12c.x;
|
||||
arg11->y = sp12c.y;
|
||||
arg11->z = sp12c.z;
|
||||
*arg11 = sp12c;
|
||||
|
||||
cd0002c328IntTile(tile, &sp12c, &sp120, arg12, arg13);
|
||||
|
||||
@@ -3979,17 +3917,11 @@ bool cdExamAToBGeolist(u8 *start, u8 *end, struct coord *arg2, struct coord *arg
|
||||
result = true;
|
||||
*arg10 = sum;
|
||||
|
||||
arg11->x = sp12c.x;
|
||||
arg11->y = sp12c.y;
|
||||
arg11->z = sp12c.z;
|
||||
*arg11 = sp12c;
|
||||
|
||||
arg12->x = sp114.x;
|
||||
arg12->y = sp114.y;
|
||||
arg12->z = sp114.z;
|
||||
*arg12 = sp114;
|
||||
|
||||
arg13->x = sp108.x;
|
||||
arg13->y = sp108.y;
|
||||
arg13->z = sp108.z;
|
||||
*arg13 = sp108;
|
||||
|
||||
*geoptr = geo;
|
||||
}
|
||||
@@ -4038,9 +3970,7 @@ bool cdExamAToBGeolist(u8 *start, u8 *end, struct coord *arg2, struct coord *arg
|
||||
result = true;
|
||||
*arg10 = sum;
|
||||
|
||||
arg11->x = spe0.x;
|
||||
arg11->y = spe0.y;
|
||||
arg11->z = spe0.z;
|
||||
*arg11 = spe0;
|
||||
|
||||
cd0002c528FltTile(tile, &spe0, &spd4, arg12, arg13);
|
||||
|
||||
@@ -4058,17 +3988,11 @@ bool cdExamAToBGeolist(u8 *start, u8 *end, struct coord *arg2, struct coord *arg
|
||||
result = true;
|
||||
*arg10 = sum;
|
||||
|
||||
arg11->x = spe0.x;
|
||||
arg11->y = spe0.y;
|
||||
arg11->z = spe0.z;
|
||||
*arg11 = spe0;
|
||||
|
||||
arg12->x = spc8.x;
|
||||
arg12->y = spc8.y;
|
||||
arg12->z = spc8.z;
|
||||
*arg12 = spc8;
|
||||
|
||||
arg13->x = spbc.x;
|
||||
arg13->y = spbc.y;
|
||||
arg13->z = spbc.z;
|
||||
*arg13 = spbc;
|
||||
|
||||
*geoptr = geo;
|
||||
}
|
||||
@@ -4094,17 +4018,11 @@ bool cdExamAToBGeolist(u8 *start, u8 *end, struct coord *arg2, struct coord *arg
|
||||
result = true;
|
||||
*arg10 = sum;
|
||||
|
||||
arg11->x = spb0.x;
|
||||
arg11->y = spb0.y;
|
||||
arg11->z = spb0.z;
|
||||
*arg11 = spb0;
|
||||
|
||||
arg12->x = spa4.x;
|
||||
arg12->y = spa4.y;
|
||||
arg12->z = spa4.z;
|
||||
*arg12 = spa4;
|
||||
|
||||
arg13->x = sp98.x;
|
||||
arg13->y = sp98.y;
|
||||
arg13->z = sp98.z;
|
||||
*arg13 = sp98;
|
||||
|
||||
*geoptr = geo;
|
||||
}
|
||||
@@ -4129,17 +4047,11 @@ bool cdExamAToBGeolist(u8 *start, u8 *end, struct coord *arg2, struct coord *arg
|
||||
result = true;
|
||||
*arg10 = sum;
|
||||
|
||||
arg11->x = sp88.x;
|
||||
arg11->y = sp88.y;
|
||||
arg11->z = sp88.z;
|
||||
*arg11 = sp88;
|
||||
|
||||
arg12->x = sp7c.x;
|
||||
arg12->y = sp7c.y;
|
||||
arg12->z = sp7c.z;
|
||||
*arg12 = sp7c;
|
||||
|
||||
arg13->x = sp70.x;
|
||||
arg13->y = sp70.y;
|
||||
arg13->z = sp70.z;
|
||||
*arg13 = sp70;
|
||||
|
||||
*geoptr = geo;
|
||||
}
|
||||
|
||||
+1
-3
@@ -17,9 +17,7 @@ void portalGetAvgVertexPos(s32 portalnum, struct coord *avg)
|
||||
f32 f0;
|
||||
s32 i;
|
||||
|
||||
avg->x = pvertices->vertices[0].x;
|
||||
avg->y = pvertices->vertices[0].y;
|
||||
avg->z = pvertices->vertices[0].z;
|
||||
*avg = pvertices->vertices[0];
|
||||
|
||||
f0 = 1.0f / pvertices->count;
|
||||
|
||||
|
||||
+15
-45
@@ -364,25 +364,19 @@ void modelNodeGetPosition(struct model *model, struct modelnode *node, struct co
|
||||
case MODELNODETYPE_CHRINFO:
|
||||
{
|
||||
struct modelrwdata_chrinfo *rwdata = modelGetNodeRwData(model, node);
|
||||
pos->x = rwdata->pos.x;
|
||||
pos->y = rwdata->pos.y;
|
||||
pos->z = rwdata->pos.z;
|
||||
*pos = rwdata->pos;
|
||||
}
|
||||
break;
|
||||
case MODELNODETYPE_POSITION:
|
||||
{
|
||||
struct modelrodata_position *rodata = &node->rodata->position;
|
||||
pos->x = rodata->pos.x;
|
||||
pos->y = rodata->pos.y;
|
||||
pos->z = rodata->pos.z;
|
||||
*pos = rodata->pos;
|
||||
}
|
||||
break;
|
||||
case MODELNODETYPE_POSITIONHELD:
|
||||
{
|
||||
struct modelrodata_positionheld *rodata = &node->rodata->positionheld;
|
||||
pos->x = rodata->pos.x;
|
||||
pos->y = rodata->pos.y;
|
||||
pos->z = rodata->pos.z;
|
||||
*pos = rodata->pos;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -404,9 +398,7 @@ void modelNodeSetPosition(struct model *model, struct modelnode *node, struct co
|
||||
diff[0].x = pos->x - rwdata->pos.x;
|
||||
diff[0].z = pos->z - rwdata->pos.z;
|
||||
|
||||
rwdata->pos.x = pos->x;
|
||||
rwdata->pos.y = pos->y;
|
||||
rwdata->pos.z = pos->z;
|
||||
rwdata->pos = *pos;
|
||||
|
||||
rwdata->unk24.x += diff[0].x; rwdata->unk24.z += diff[0].z;
|
||||
rwdata->unk34.x += diff[0].x; rwdata->unk34.z += diff[0].z;
|
||||
@@ -417,17 +409,13 @@ void modelNodeSetPosition(struct model *model, struct modelnode *node, struct co
|
||||
case MODELNODETYPE_POSITION:
|
||||
{
|
||||
struct modelrodata_position *rodata = &node->rodata->position;
|
||||
rodata->pos.x = pos->x;
|
||||
rodata->pos.y = pos->y;
|
||||
rodata->pos.z = pos->z;
|
||||
rodata->pos = *pos;
|
||||
}
|
||||
break;
|
||||
case MODELNODETYPE_POSITIONHELD:
|
||||
{
|
||||
struct modelrodata_positionheld *rodata = &node->rodata->positionheld;
|
||||
rodata->pos.x = pos->x;
|
||||
rodata->pos.y = pos->y;
|
||||
rodata->pos.z = pos->z;
|
||||
rodata->pos = *pos;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -576,9 +564,7 @@ void model0001b0e8(struct model *model, struct modelnode *node)
|
||||
return;
|
||||
}
|
||||
|
||||
sp34.x = rwdata->chrinfo.unk34.x;
|
||||
sp34.y = rwdata->chrinfo.unk34.y;
|
||||
sp34.z = rwdata->chrinfo.unk34.z;
|
||||
sp34 = rwdata->chrinfo.unk34;
|
||||
|
||||
rwdata->chrinfo.unk14 = rwdata->chrinfo.unk30;
|
||||
|
||||
@@ -615,9 +601,7 @@ void model0001b0e8(struct model *model, struct modelnode *node)
|
||||
rwdata->chrinfo.pos.y = rwdata->chrinfo.ground + sp34.f[1];
|
||||
rwdata->chrinfo.pos.z = sp34.z;
|
||||
} else {
|
||||
sp28.x = sp34.x;
|
||||
sp28.y = sp34.y;
|
||||
sp28.z = sp34.z;
|
||||
sp28 = sp34;
|
||||
|
||||
if (anim->unk70(model, &rwdata->chrinfo.pos, &sp28, &rwdata->chrinfo.ground)) {
|
||||
rwdata->chrinfo.pos.x = sp28.x;
|
||||
@@ -1682,12 +1666,8 @@ void modelCopyAnimForMerge(struct model *model, f32 merge)
|
||||
if (nodetype == MODELNODETYPE_CHRINFO) {
|
||||
struct modelrwdata_chrinfo *rwdata = modelGetNodeRwData(model, node);
|
||||
rwdata->unk02 = 1;
|
||||
rwdata->unk4c.x = rwdata->unk34.x;
|
||||
rwdata->unk4c.y = rwdata->unk34.y;
|
||||
rwdata->unk4c.z = rwdata->unk34.z;
|
||||
rwdata->unk40.x = rwdata->unk24.x;
|
||||
rwdata->unk40.y = rwdata->unk24.y;
|
||||
rwdata->unk40.z = rwdata->unk24.z;
|
||||
rwdata->unk4c = rwdata->unk34;
|
||||
rwdata->unk40 = rwdata->unk24;
|
||||
}
|
||||
} else {
|
||||
anim->animnum2 = 0;
|
||||
@@ -2114,15 +2094,11 @@ void model0001e2b4(struct model *model, f32 curframe, f32 endframe, f32 curframe
|
||||
struct coord sp90;
|
||||
u32 stack;
|
||||
|
||||
spe0.x = rwdata->unk34.x;
|
||||
spe0.y = rwdata->unk34.y;
|
||||
spe0.z = rwdata->unk34.z;
|
||||
spe0 = rwdata->unk34;
|
||||
|
||||
f30 = rwdata->unk30;
|
||||
|
||||
spd0.x = rwdata->unk24.x;
|
||||
spd0.y = rwdata->unk24.y;
|
||||
spd0.z = rwdata->unk24.z;
|
||||
spd0 = rwdata->unk24;
|
||||
|
||||
spcc = rwdata->unk20;
|
||||
spc8 = rwdata->unk01;
|
||||
@@ -2162,9 +2138,7 @@ void model0001e2b4(struct model *model, f32 curframe, f32 endframe, f32 curframe
|
||||
anim->framea = s0frame;
|
||||
|
||||
if (spc8 && floorend == anim->frameb) {
|
||||
spe0.x = spd0.x;
|
||||
spe0.y = spd0.y;
|
||||
spe0.z = spd0.z;
|
||||
spe0 = spd0;
|
||||
} else {
|
||||
anim00023d38(anim->animnum);
|
||||
s0 = anim00023ab0(anim->animnum, s0frame);
|
||||
@@ -2216,9 +2190,7 @@ void model0001e2b4(struct model *model, f32 curframe, f32 endframe, f32 curframe
|
||||
anim->framea = s0frame;
|
||||
|
||||
if (spc8) {
|
||||
spe0.x = spd0.x;
|
||||
spe0.y = spd0.y;
|
||||
spe0.z = spd0.z;
|
||||
spe0 = spd0;
|
||||
|
||||
if (rwdata->unk18 == 0.0f) {
|
||||
f30 = spcc;
|
||||
@@ -2360,9 +2332,7 @@ void model0001e2b4(struct model *model, f32 curframe, f32 endframe, f32 curframe
|
||||
}
|
||||
}
|
||||
|
||||
rwdata->unk34.x = spe0.x;
|
||||
rwdata->unk34.y = spe0.y;
|
||||
rwdata->unk34.z = spe0.z;
|
||||
rwdata->unk34 = spe0;
|
||||
|
||||
rwdata->unk30 = f30;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user