- fixed merge errors from backend update.

This commit is contained in:
Christoph Oelckers 2022-11-24 18:05:47 +01:00
parent 9219d24535
commit d43ebd22ae
2 changed files with 8 additions and 1 deletions

View file

@ -316,9 +316,16 @@ public:
// Returns a reference to the last element
T &Last() const
{
assert(Count > 0);
return Array[Count-1];
}
T SafeGet (size_t index, const T& defaultval) const
{
if (index <= Count) return Array[index];
else return defaultval;
}
// returns address of first element
T *Data() const
{

View file

@ -318,7 +318,7 @@ void S_GetCamera(DVector3* c, DAngle* ca, sectortype** cs)
if (ud.cameraactor == nullptr)
{
auto p = &ps[screenpeek];
if (c) *c = p->actor->spr.pos;
if (c) *c = p->pos;
if (cs) *cs = p->cursector;
if (ca) *ca = p->angle.ang;
}