mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-18 09:45:28 +00:00
Merge origin/main into experimental: behaviors, raw terrain scene lookups, property model fixes, player count
Main's model behaviors (every rotation, DoDamage, OnTimer, OnStartup, MoveBackToStart, moves along the model's local axes), raw terrain reading with scene lookups and scene tools, property model and brick by brick fixes and the chat server's player count fix, merged onto this branch's structures: - game messages stay structs; the angular velocity messages join them and the handler sets a message's target - strips own their speed again and the block names, moves and rotations stay in the shared action table (PropertyBehaviorActions, which the dashboard's behavior player reads; it now lists rotations too) - the zone keeps reading its file through ZoneFile and takes the boundaries from it, then loads the raw terrain as main does; the old dNavigation terrain reader is gone - the show all response stays a struct and logs a player count mismatch as main does - the property management component tells models who sent a chat message Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -16,9 +16,11 @@ namespace PropertyBehaviorActions {
|
||||
constexpr std::string_view ON_INTERACT = "OnInteract";
|
||||
constexpr std::string_view ON_ATTACK = "OnAttack";
|
||||
constexpr std::string_view ON_CHAT = "OnChat";
|
||||
constexpr std::array TRIGGERS{ ON_INTERACT, ON_ATTACK, ON_CHAT };
|
||||
constexpr std::string_view ON_STARTUP = "OnStartup";
|
||||
constexpr std::string_view ON_TIMER = "OnTimer";
|
||||
constexpr std::array TRIGGERS{ ON_INTERACT, ON_ATTACK, ON_CHAT, ON_STARTUP, ON_TIMER };
|
||||
|
||||
// Moves the block's distance along a world axis at the model's speed
|
||||
// Moves the block's distance along one of the model's local axes (right x, up y, forward z) at the strip's speed
|
||||
struct Move {
|
||||
std::string_view type;
|
||||
char axis; // 'x', 'y' or 'z'
|
||||
@@ -30,6 +32,13 @@ namespace PropertyBehaviorActions {
|
||||
Move{ "MoveForward", 'z', 1.0f }, Move{ "MoveBackward", 'z', -1.0f },
|
||||
};
|
||||
|
||||
// Turns the block's degrees about one of the model's local axes (tilt x, spin y, roll z) at the strip's speed
|
||||
constexpr std::array ROTATIONS{
|
||||
Move{ "Spin", 'y', 1.0f }, Move{ "SpinNegative", 'y', -1.0f },
|
||||
Move{ "Tilt", 'x', 1.0f }, Move{ "TiltNegative", 'x', -1.0f },
|
||||
Move{ "Roll", 'z', 1.0f }, Move{ "RollNegative", 'z', -1.0f },
|
||||
};
|
||||
|
||||
// Blocks that make an object: spawns make one enemy at the model; drops give every player one powerup per unit of
|
||||
// the block's value
|
||||
struct LotBlock {
|
||||
@@ -63,6 +72,8 @@ namespace PropertyBehaviorActions {
|
||||
|
||||
// The rest, each with its own handling
|
||||
constexpr std::string_view SET_SPEED = "SetSpeed";
|
||||
constexpr std::string_view MOVE_BACK_TO_START = "MoveBackToStart";
|
||||
constexpr std::string_view DO_DAMAGE = "DoDamage";
|
||||
constexpr std::string_view SMASH = "Smash";
|
||||
constexpr std::string_view UNSMASH = "UnSmash";
|
||||
constexpr std::string_view WAIT = "Wait";
|
||||
@@ -70,9 +81,9 @@ namespace PropertyBehaviorActions {
|
||||
constexpr std::string_view PRIVATE_MESSAGE = "PrivateMessage";
|
||||
constexpr std::string_view PLAY_SOUND = "PlaySound";
|
||||
constexpr std::string_view RESTART = "Restart";
|
||||
constexpr std::array OTHERS{ SET_SPEED, SMASH, UNSMASH, WAIT, CHAT, PRIVATE_MESSAGE, PLAY_SOUND, RESTART };
|
||||
constexpr std::array OTHERS{ SET_SPEED, MOVE_BACK_TO_START, DO_DAMAGE, SMASH, UNSMASH, WAIT, CHAT, PRIVATE_MESSAGE, PLAY_SOUND, RESTART };
|
||||
|
||||
// The speed models move at until a Set Speed block (ModelComponent)
|
||||
// The speed a strip's moves and rotations start at until a Set Speed block (Strip)
|
||||
constexpr float DEFAULT_SPEED = 3.0f;
|
||||
|
||||
// The table entry for a block type, or nullptr
|
||||
|
||||
Reference in New Issue
Block a user