New attack busy system

Added missing #includes

Added LUA scripting and console

Changed the way tracers are visualized, so they work more like real tracers instead of a light fountain

Fixed signedness of many grid variables used in GetMouseMapPos calls

Fixed enemy weapon choosing:  Sometimes a mortar is chosen but later rejected, but the grenade class was not reset.  Caused assertion failure

Added checks so enemies don't try to chuck RPG grenades with their hands

Now possible to shoot a someone in the head if he's in water

Fixed InitSightArrays to also clear soldier interrupt duel points.  This was causing an assertion failure elsewhere in the code because the interrupt list still had soldiers on it sometimes when this function was called.

Soldiers are much less willing to forfeit their turn over an attempt to use more APs than they have

Removed early setting of muzzle flash.  This would allow enemies to get an interrupt before you even fired.

Fixed item dropping by AI.  If AI tried to drop something while standing it would cause deadlock

Change to greatly speed up closing the sector inventory window in an unloaded sector

Added conditional compile flag to always give robot weapon ready advantage, even for 360 degree sighting


Check builddefines.h for the conditional flags.  Of greatest interest might be LUA_CONSOLE.  This will cause the game to bring up a command console when run.  However this console is severely lacking in many areas.  If anybody knows of an open-source terminal/console that could be used instead, it would be appreciated.  The existing console does bad things when you try to close it, and since it counts as a separate app, it pauses the game while it has focus.

LUA scripting is very limited, basically just proof of concept.  There is one global variable, the Soldiers array.  An array index gives you the soldier in that slot in the currently loaded sector.  The soldier has a few things that can be accessed:  name (short name); fullname (long name); grid (current grid #, can be changed); walkto(grid) (function to walk to another grid); runto(grid) (function to run to another grid)


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@924 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Overhaul
2007-06-09 09:01:04 +00:00
parent 8ed1ff9d6e
commit 7a27e7105d
275 changed files with 25107 additions and 20463 deletions
+17 -7
View File
@@ -56,10 +56,20 @@
#define ANIM_RAISE_WEAPON 0x00080000
#define ANIM_NOCHANGE_WEAPON 0x00100000
#define ANIM_NOCHANGE_PENDINGCOUNT 0x00200000
#define ANIM_NO_EFFORT 0x00400000
#define ANIM_MIN_EFFORT 0x00800000
#define ANIM_LIGHT_EFFORT 0x01000000
#define ANIM_MODERATE_EFFORT 0x02000000
// I'm commandeering the effort flags. I do not expect to see multiple efforts for the same tasks, so I'm turning them into a 2-bit
// level instead. So there :P
#define ANIM_NO_EFFORT 0x00000000
#define ANIM_MIN_EFFORT 0x00400000
#define ANIM_LIGHT_EFFORT 0x00800000
#define ANIM_MODERATE_EFFORT 0x00C00000
// Return a number between 0 and 4 to indicate effort. 4 means variable
#define EFFORT(flags) (((flags) & ANIM_VARIABLE_EFFORT) ? 4 : ((flags) & 0x00C00000) >> 22)
// Now I have room for a new flag. And there's still room for one more!
#define ANIM_ATTACK 0x01000000
#define ANIM_FREEFORUSE 0x02000000
#define ANIM_RT_NONINTERRUPT 0x04000000
#define ANIM_VARIABLE_EFFORT 0x08000000
#define ANIM_UPDATEMOVEMENTMODE 0x10000000
@@ -92,7 +102,7 @@ typedef struct
INT16 sAP;
INT16 sSpeed;
FLOAT dMovementChange;
UINT32 uiFlags;
UINT32 uiFlags;
UINT8 ubHeight;
UINT8 ubEndHeight;
INT8 bProfile;
@@ -530,7 +540,7 @@ enum AnimationStates
LOCKPICK_CROUCHED,
//<SB> crouch throwing
THROW_ITEM_CROUCHED,
THROW_ITEM_CROUCHED,
//</SB>
NUMANIMATIONSTATES
@@ -572,4 +582,4 @@ UINT16 LoadSoldierAnimationSurface( SOLDIERTYPE *pSoldier, UINT16 usAnimState );
UINT16 GetSoldierAnimationSurface( SOLDIERTYPE *pSoldier, UINT16 usAnimState );
#endif
#endif