diff options
| -rw-r--r-- | sword1/logic.cpp | 7 | ||||
| -rw-r--r-- | sword1/sworddefs.h | 18 | 
2 files changed, 13 insertions, 12 deletions
diff --git a/sword1/logic.cpp b/sword1/logic.cpp index e536986ff6..660ee3517c 100644 --- a/sword1/logic.cpp +++ b/sword1/logic.cpp @@ -1215,8 +1215,11 @@ int Logic::fnTheyDo(Object *cpt, int32 id, int32 tar, int32 instruc, int32 param  //send an instruction to mega we're talking to and wait  //until it has finished before returning to script  int Logic::fnTheyDoWeWait(Object *cpt, int32 id, int32 tar, int32 instruc, int32 param1, int32 param2, int32 param3, int32 x) { -	Object *target; -	target = _objMan->fetchObject(tar); +	// workaround for scriptbug #928791: Freeze at hospital +	// in at least one game version, a script forgets to set sam_returning back to zero +	if ((tar == SAM) && (instruc == INS_talk) && (param2 == 2162856)) +		_scriptVars[SAM_RETURNING] = 0; +	Object *target = _objMan->fetchObject(tar);  	target->o_down_flag = instruc; // instruction for the mega  	target->o_ins1 = param1;  	target->o_ins2 = param2; diff --git a/sword1/sworddefs.h b/sword1/sworddefs.h index 1e89068135..6f142b9b3a 100644 --- a/sword1/sworddefs.h +++ b/sword1/sworddefs.h @@ -50,6 +50,11 @@ namespace Sword1 {  #define LOGIC_new_script 15  #define LOGIC_pause_for_event 16 +#define SCRIPT_CONT 1 +#define SCRIPT_STOP 0 + +#define INS_talk 1 +  #define TOTAL_pockets 52  #define TOTAL_subjects (375-256+1)  #define BASE_SUBJECT 256 @@ -111,12 +116,6 @@ struct WalkGridHeader {  	#pragma END_PACK_STRUCTS  #endif -/*struct RSprite { -	Header header; -	uint32 totalSprites; -	uint32 spriteOffset[2];			//2 is arbitrary number -}*/ -  enum Language {  	BS1_ENGLISH = 0,  	BS1_FRENCH, @@ -127,12 +126,11 @@ enum Language {  	BS1_PORT  }; -#define SCRIPT_CONT 1 -#define SCRIPT_STOP 0 - +#define SAM 2162689  #define PLAYER 8388608 -#define NICO 8454144  #define GEORGE 8388608 +#define NICO 8454144 +  #define UP 0  #define UP_RIGHT 1  #define U_R 1  | 
