From 6d498fe17dab48cfd8fc8a4da62a573b799e10ba Mon Sep 17 00:00:00 2001 From: fusion32 Date: Wed, 16 Jul 2025 17:22:39 -0300 Subject: fix most init and parsing bugs + critical bug with dynamic strings With an appropriate query manager, the server now starts up and seems to work but won't properly handle connections until we fix the problem with threads and signals described in `TODO.md`. --- src/moveuse.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/moveuse.cc') diff --git a/src/moveuse.cc b/src/moveuse.cc index 6c83dcc..cd03bd8 100644 --- a/src/moveuse.cc +++ b/src/moveuse.cc @@ -2543,7 +2543,7 @@ void LoadParameters(TReadScriptFile *Script, int *Parameters, int NumberOfParame } case MOVEUSE_PARAMETER_RIGHT:{ - const char *Right = Script->getIdentifier(); + const char *Right = Script->readIdentifier(); if(strcmp(Right, "premium_account") == 0){ Parameters[i] = PREMIUM_ACCOUNT; }else if(strcmp(Right, "special_moveuse") == 0){ @@ -2968,22 +2968,24 @@ void LoadDataBase(void){ if(strcmp(Identifier, "begin") == 0){ Script.readString(); + Script.nextToken(); continue; }else if(strcmp(Identifier, "end") == 0){ + Script.nextToken(); continue; } int EventType; if(strcmp(Identifier, "use") == 0){ - EventType = MOVEUSE_EVENT_MULTIUSE; + EventType = MOVEUSE_EVENT_USE; }else if(strcmp(Identifier, "multiuse") == 0){ EventType = MOVEUSE_EVENT_MULTIUSE; }else if(strcmp(Identifier, "movement") == 0){ - EventType = MOVEUSE_EVENT_MULTIUSE; + EventType = MOVEUSE_EVENT_MOVEMENT; }else if(strcmp(Identifier, "collision") == 0){ - EventType = MOVEUSE_EVENT_MULTIUSE; + EventType = MOVEUSE_EVENT_COLLISION; }else if(strcmp(Identifier, "separation") == 0){ - EventType = MOVEUSE_EVENT_MULTIUSE; + EventType = MOVEUSE_EVENT_SEPARATION; }else{ Script.error("Unknown event type"); } -- cgit v1.2.3