mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 12:30:40 +00:00
- Blood: Floatified playerStart()
and ZONE::ang
.
This commit is contained in:
parent
243c071834
commit
b8b5fe9162
4 changed files with 12 additions and 13 deletions
|
@ -294,18 +294,18 @@ void StartLevel(MapRecord* level, bool newgame)
|
||||||
for (int i = 0; i < kMaxPlayers; i++) {
|
for (int i = 0; i < kMaxPlayers; i++) {
|
||||||
gStartZone[i].pos = startpos;
|
gStartZone[i].pos = startpos;
|
||||||
gStartZone[i].sector = startsector;
|
gStartZone[i].sector = startsector;
|
||||||
gStartZone[i].ang = startang;
|
gStartZone[i].angle = DAngle::fromBuild(startang);
|
||||||
|
|
||||||
#ifdef NOONE_EXTENSIONS
|
#ifdef NOONE_EXTENSIONS
|
||||||
// Create spawn zones for players in teams mode.
|
// Create spawn zones for players in teams mode.
|
||||||
if (gModernMap && i <= kMaxPlayers / 2) {
|
if (gModernMap && i <= kMaxPlayers / 2) {
|
||||||
gStartZoneTeam1[i].pos = startpos;
|
gStartZoneTeam1[i].pos = startpos;
|
||||||
gStartZoneTeam1[i].sector = startsector;
|
gStartZoneTeam1[i].sector = startsector;
|
||||||
gStartZoneTeam1[i].ang = startang;
|
gStartZoneTeam1[i].angle = DAngle::fromBuild(startang);
|
||||||
|
|
||||||
gStartZoneTeam2[i].pos = startpos;
|
gStartZoneTeam2[i].pos = startpos;
|
||||||
gStartZoneTeam2[i].sector = startsector;
|
gStartZoneTeam2[i].sector = startsector;
|
||||||
gStartZoneTeam2[i].ang = startang;
|
gStartZoneTeam2[i].angle = DAngle::fromBuild(startang);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ void WeaponPrecache();
|
||||||
struct ZONE {
|
struct ZONE {
|
||||||
DVector3 pos;
|
DVector3 pos;
|
||||||
sectortype* sector;
|
sectortype* sector;
|
||||||
short ang;
|
DAngle angle;
|
||||||
};
|
};
|
||||||
extern ZONE gStartZone[8];
|
extern ZONE gStartZone[8];
|
||||||
|
|
||||||
|
|
|
@ -806,12 +806,11 @@ void playerStart(int nPlayer, int bNewLevel)
|
||||||
seqSpawn(pDudeInfo->seqStartID, actor, -1);
|
seqSpawn(pDudeInfo->seqStartID, actor, -1);
|
||||||
if (nPlayer == myconnectindex)
|
if (nPlayer == myconnectindex)
|
||||||
actor->spr.cstat2 |= CSTAT2_SPRITE_MAPPED;
|
actor->spr.cstat2 |= CSTAT2_SPRITE_MAPPED;
|
||||||
int top, bottom;
|
double top, bottom;
|
||||||
GetActorExtents(actor, &top, &bottom);
|
GetActorExtents(actor, &top, &bottom);
|
||||||
actor->add_int_z(-(bottom - actor->int_pos().Z));
|
actor->spr.pos.Z -= bottom - actor->spr.pos.Z;
|
||||||
actor->spr.pal = 11 + (pPlayer->teamId & 3);
|
actor->spr.pal = 11 + (pPlayer->teamId & 3);
|
||||||
actor->set_int_ang(pStartZone->ang);
|
actor->spr.angle = pPlayer->angle.ang = pStartZone->angle;
|
||||||
pPlayer->angle.ang = actor->spr.angle;
|
|
||||||
actor->spr.type = kDudePlayer1 + nPlayer;
|
actor->spr.type = kDudePlayer1 + nPlayer;
|
||||||
actor->set_native_clipdist(pDudeInfo->clipdist);
|
actor->set_native_clipdist(pDudeInfo->clipdist);
|
||||||
actor->spr.flags = 15;
|
actor->spr.flags = 15;
|
||||||
|
|
|
@ -85,7 +85,7 @@ void warpInit(TArray<DBloodActor*>& actors)
|
||||||
ZONE* pZone = &gStartZone[actor->xspr.data1];
|
ZONE* pZone = &gStartZone[actor->xspr.data1];
|
||||||
pZone->pos = actor->spr.pos;
|
pZone->pos = actor->spr.pos;
|
||||||
pZone->sector = actor->sector();
|
pZone->sector = actor->sector();
|
||||||
pZone->ang = actor->int_ang();
|
pZone->angle = actor->spr.angle;
|
||||||
}
|
}
|
||||||
DeleteSprite(actor);
|
DeleteSprite(actor);
|
||||||
break;
|
break;
|
||||||
|
@ -96,7 +96,7 @@ void warpInit(TArray<DBloodActor*>& actors)
|
||||||
ZONE* pZone = &gStartZone[actor->xspr.data1];
|
ZONE* pZone = &gStartZone[actor->xspr.data1];
|
||||||
pZone->pos = actor->spr.pos;
|
pZone->pos = actor->spr.pos;
|
||||||
pZone->sector = actor->sector();
|
pZone->sector = actor->sector();
|
||||||
pZone->ang = actor->int_ang();
|
pZone->angle = actor->spr.angle;
|
||||||
|
|
||||||
#ifdef NOONE_EXTENSIONS
|
#ifdef NOONE_EXTENSIONS
|
||||||
// fill player spawn position according team of player in TEAMS mode.
|
// fill player spawn position according team of player in TEAMS mode.
|
||||||
|
@ -105,7 +105,7 @@ void warpInit(TArray<DBloodActor*>& actors)
|
||||||
pZone = &gStartZoneTeam1[team1];
|
pZone = &gStartZoneTeam1[team1];
|
||||||
pZone->pos = actor->spr.pos;
|
pZone->pos = actor->spr.pos;
|
||||||
pZone->sector = actor->sector();
|
pZone->sector = actor->sector();
|
||||||
pZone->ang = actor->int_ang();
|
pZone->angle = actor->spr.angle;
|
||||||
team1++;
|
team1++;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ void warpInit(TArray<DBloodActor*>& actors)
|
||||||
pZone = &gStartZoneTeam2[team2];
|
pZone = &gStartZoneTeam2[team2];
|
||||||
pZone->pos = actor->spr.pos;
|
pZone->pos = actor->spr.pos;
|
||||||
pZone->sector = actor->sector();
|
pZone->sector = actor->sector();
|
||||||
pZone->ang = actor->int_ang();
|
pZone->angle = actor->spr.angle;
|
||||||
team2++;
|
team2++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -317,7 +317,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, ZONE& w, ZONE* def
|
||||||
{
|
{
|
||||||
arc("pos", w.pos)
|
arc("pos", w.pos)
|
||||||
("sector", w.sector)
|
("sector", w.sector)
|
||||||
("angle", w.ang)
|
("angle", w.angle)
|
||||||
.EndObject();
|
.EndObject();
|
||||||
}
|
}
|
||||||
return arc;
|
return arc;
|
||||||
|
|
Loading…
Reference in a new issue