mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-07-11 15:29:16 -04:00
Added adjustable track properties to editor
This commit is contained in:
@@ -24,6 +24,8 @@ extern "C" {
|
||||
#include "src/racing/collision.h"
|
||||
}
|
||||
|
||||
namespace EditorNamespace {
|
||||
|
||||
Gizmo::Gizmo() {
|
||||
}
|
||||
|
||||
@@ -109,6 +111,16 @@ void Gizmo::Translate() {
|
||||
break;
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gEditorBoundary", 0) == true) {
|
||||
_selected->Pos->x = MAX(_selected->Pos->x, dimensions.MinX);
|
||||
_selected->Pos->x = MIN(_selected->Pos->x, dimensions.MaxX);
|
||||
|
||||
_selected->Pos->y = MAX(_selected->Pos->y, dimensions.MinY);
|
||||
_selected->Pos->y = MIN(_selected->Pos->y, dimensions.MaxY);
|
||||
|
||||
_selected->Pos->z = MAX(_selected->Pos->z, dimensions.MinZ);
|
||||
_selected->Pos->z = MIN(_selected->Pos->z, dimensions.MaxZ);
|
||||
}
|
||||
|
||||
Pos = FVector(
|
||||
_selected->Pos->x,
|
||||
@@ -195,3 +207,4 @@ void Gizmo::DrawHandles() {
|
||||
gSPDisplayList(gDisplayListHead++, handle_Cylinder_mesh);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user