diff options
| author | fusion32 <marcopuzziello@gmail.com> | 2025-07-16 17:22:39 -0300 |
|---|---|---|
| committer | fusion32 <marcopuzziello@gmail.com> | 2025-07-16 17:22:39 -0300 |
| commit | 6d498fe17dab48cfd8fc8a4da62a573b799e10ba (patch) | |
| tree | 1c8d55bd907b35abf014385dbedb90b2ae98f96a /src/moveuse.cc | |
| parent | e65dc561acab7a9e49f59777f16cb040c574c64d (diff) | |
| download | game-6d498fe17dab48cfd8fc8a4da62a573b799e10ba.tar.gz game-6d498fe17dab48cfd8fc8a4da62a573b799e10ba.zip | |
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`.
Diffstat (limited to 'src/moveuse.cc')
| -rw-r--r-- | src/moveuse.cc | 12 |
1 files changed, 7 insertions, 5 deletions
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"); } |
