Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 34f1e28

Browse files
committed
Merge branch 'development' into CF112-FMOD-Fixes
# Conflicts: # System/ContentFile.h - No real conflict I guess
2 parents bc8b8a9 + 020d2ee commit 34f1e28

35 files changed

+406
-346
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ compile_commands.json
1717
/NATPunchServer/Server/NATCompleteServer/Release
1818
/Documentation/Doxygen/Output
1919
MemCleanupInfo.txt
20+
RTEA.vcxproj.user

Activities/MultiplayerServerLobby.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ namespace RTE {
342342
m_pScenePreviewBitmap = create_bitmap_ex(8, Scene::PREVIEW_WIDTH, Scene::PREVIEW_HEIGHT);
343343

344344
ContentFile defaultPreview("Base.rte/GUIs/DefaultPreview.png");
345-
m_pDefaultPreviewBitmap = defaultPreview.LoadAndReleaseBitmap();
345+
m_pDefaultPreviewBitmap = defaultPreview.GetAsBitmap(COLORCONV_NONE, false);
346346

347347
clear_to_color(m_pScenePreviewBitmap, g_MaskColor);
348348

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
141141

142142
- `FLAC` audio files can now be loaded through lua and ini.
143143

144+
- Added new lua `Vector` functions: `GetRadRotated(angle)` and `GetDegRotated(angle)`. They return a rotated copy of the vector without modifying it.
145+
144146
### Changed
145147

146148
- Codebase now uses the C++17 standard.
@@ -256,6 +258,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
256258

257259
- The "woosh" sound played when switching actors from a distance will now take scene wrapping into account. Additionally, attempting to switch to previous or next actor with only one actor will play the more correct "error" sound.
258260

261+
- Pressing escape at the options, mod manager, game editors and credits screens no longer quits the game.
262+
259263
### Removed
260264

261265
- Removed the ability to remove scripts from objects with Lua. This is no longer needed cause of code efficiency increases.

Entities/AtomGroup.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,10 @@ namespace RTE {
10081008
if (hitMOID != g_NoMOID) {
10091009
hitData.Body[HITOR] = m_OwnerMOSR;
10101010
hitData.Body[HITEE] = g_MovableMan.GetMOFromID(hitMOID);
1011+
1012+
#ifndef RELEASE_BUILD
10111013
RTEAssert(hitData.Body[HITEE], "Hitee MO is 0 in AtomGroup::PushTravel!");
1014+
#endif
10121015

10131016
hitData.Body[HITEE]->CollideAtPoint(hitData);
10141017

Entities/Attachable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ void Attachable::Detach()
300300
// Since it's no longer atteched it should belong to itself
301301
m_RootMOID = m_MOID;
302302

303-
#if defined DEBUG_BUILD || defined MIN_DEBUG_BUILD
303+
#ifndef RELEASE_BUILD
304304
RTEAssert(m_RootMOID == g_NoMOID || (m_RootMOID >= 0 && m_RootMOID < g_MovableMan.GetMOIDCount()), "MOID out of bounds!");
305305
RTEAssert(m_MOID == g_NoMOID || (m_MOID >= 0 && m_MOID < g_MovableMan.GetMOIDCount()), "MOID out of bounds!");
306306
#endif

Entities/HDFirearm.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ void HDFirearm::Update()
800800
(m_Supported ? 1.0F : m_NoSupportFactor) * RandomNormalNum();
801801
tempNozzle = m_MuzzleOff.GetYFlipped(m_HFlipped);
802802
tempNozzle.DegRotate(degAimAngle + shake);
803-
roundVel.SetIntXY(pRound->GetFireVel(), 0);
803+
roundVel.SetXY(pRound->GetFireVel(), 0);
804804
roundVel.DegRotate(degAimAngle + shake);
805805

806806
Vector particlePos;
@@ -864,7 +864,7 @@ void HDFirearm::Update()
864864
pShell->SetPos(m_Pos + tempEject);
865865

866866
// ##@#@@$ TEMP
867-
shellVel.SetIntXY(pRound->GetShellVel(), 0);
867+
shellVel.SetXY(pRound->GetShellVel(), 0);
868868
shellVel.DegRotate(degAimAngle + 150 * (m_HFlipped ? -1 : 1) + shellSpread);
869869
pShell->SetVel(m_Vel + shellVel);
870870
pShell->SetRotAngle(m_Rotation.GetRadAngle());

Entities/MOSRotating.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1497,7 +1497,7 @@ void MOSRotating::PostTravel()
14971497
void MOSRotating::Update()
14981498
{
14991499

1500-
#if defined DEBUG_BUILD || defined MIN_DEBUG_BUILD
1500+
#ifndef RELEASE_BUILD
15011501
RTEAssert(m_MOID == g_NoMOID || (m_MOID >= 0 && m_MOID < g_MovableMan.GetMOIDCount()), "MOID out of bounds!");
15021502
#endif
15031503

Entities/MovableObject.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,8 +1093,12 @@ friend class Atom;
10931093
// Return value: None.
10941094

10951095
void AddImpulseForce(const Vector &impulse, const Vector &offset = Vector()) {
1096+
1097+
#ifndef RELEASE_BUILD
10961098
RTEAssert(impulse.GetLargest() < 500000, "HUEG IMPULSE FORCE");
10971099
RTEAssert(offset.GetLargest() < 5000, "HUEG IMPULSE FORCE OFFSET");
1100+
#endif
1101+
10981102
m_ImpulseForces.push_back(std::make_pair(impulse, offset));
10991103
}
11001104

@@ -1111,7 +1115,11 @@ friend class Atom;
11111115
// Return value: None.
11121116

11131117
void AddAbsImpulseForce(const Vector &impulse, const Vector &absPos) {
1118+
1119+
#ifndef RELEASE_BUILD
11141120
RTEAssert(impulse.GetLargest() < 500000, "HUEG IMPULSE FORCE");
1121+
#endif
1122+
11151123
m_ImpulseForces.push_back(std::make_pair(impulse, g_SceneMan.ShortestDistance(m_Pos, absPos) * c_MPP));
11161124
}
11171125

Entities/SLTerrain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,7 @@ void SLTerrain::ApplyMovableObject(MovableObject *pMObject)
11201120
pTempBitmap = m_spTempBitmap16;
11211121

11221122
// The position of the upper left corner of the temporary bitmap in the scene
1123-
Vector bitmapScroll = pMOSprite->GetPos().GetFloored() - (pTempBitmap->w / 2);
1123+
Vector bitmapScroll = pMOSprite->GetPos().GetFloored() - Vector(pTempBitmap->w / 2, pTempBitmap->w / 2);
11241124

11251125
Box notUsed;
11261126

Entities/Scene.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1309,7 +1309,7 @@ int Scene::ReadProperty(std::string propName, Reader &reader)
13091309
else if (propName == "PreviewBitmapFile")
13101310
{
13111311
reader >> m_PreviewBitmapFile;
1312-
m_pPreviewBitmap = m_PreviewBitmapFile.LoadAndReleaseBitmap();
1312+
m_pPreviewBitmap = m_PreviewBitmapFile.GetAsBitmap(COLORCONV_NONE, false);
13131313
}
13141314
else if (propName == "Terrain")
13151315
{

0 commit comments

Comments
 (0)