Merged revision(s) 7166-7177 from branches/ja2_source_official_2014:

- Flagmasks are unsigned, and should be called and treated as such
- Fix: experience gain from interrogation was too high
- Fix: chance of a prisoner becoming militia was calculated wrong
- default weight maximum for MOVE ITEM assignment increased from 30 to 40 kg
- Fix: snitches report the same event multiple times
- Fix: snitches treat vehicles as persons
- Fix: selection of launchables is inefficient, an does not take into account wether items are depending on day/night cycle
- new key combination: in strategic, pressing [CTRL] + [E] wile both a merc's inventory and the sector inventory are open will fill the merc's inventory with sector items
- trivial code cleanup
- if prisoners are taken in a sector that houses a prison, that prison can also be selected to house them
- Fix: distributing newly taken prisoners in a prison sector no longer redistributes all prisoners, only the new ones
- GetClosestFlaggedSoldierID can also be called without evaluation of sight
- Fix: Covert Ops: throwing/lobbing items or shooting rockets is deemed suspicious behaviour
- Fix: boxing was broken by loading a savegame
- Fix: campaign history rarely recorded kills in autoresolve
- There is no reason why the IDs that boxers are reset to before they are reinitialised would ever need to be altered by a modder. Required script change in stable GameDir r2024.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7178 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2014-04-30 21:36:18 +00:00
parent 8b494003fd
commit 30060f0595
46 changed files with 759 additions and 711 deletions
+21 -11
View File
@@ -838,6 +838,8 @@ static int l_EnvEndRainStorm (lua_State *L);
static int l_ProfilesStrategicInsertionData (lua_State *L);
static int l_ResetBoxers( lua_State *L );
using namespace std;
UINT16 idProfil;
@@ -1123,7 +1125,8 @@ void IniFunction(lua_State *L, BOOLEAN bQuests )
lua_register(L, "GetNPCBalance", l_GetiBalance);
lua_register(L, "GetCharacterSectorZ", l_GetCharacterSectorZ);
lua_register(L, "GetCharacterSectorX", l_GetCharacterSectorX);
lua_register(L, "GetCharacterSectorY", l_GetCharacterSectorY);
lua_register(L, "GetCharacterSectorY", l_GetCharacterSectorY);
lua_register(L, "ResetBoxers", l_ResetBoxers );
//Tactical merc
lua_register(L, "CheckCivGroupHostile", l_fCivGroupHostile);
@@ -10588,19 +10591,26 @@ static int l_GetCharacterSectorX (lua_State *L)
//Set charcter to sector Z
static int l_SetCharacterSectorZ (lua_State *L)
{
UINT8 n = lua_gettop(L);
int i = 0;
UINT8 id = 0;
UINT8 SectorZ = 0;
for (i= 1; i<=n; i++ )
if ( lua_gettop( L ) >= 2 )
{
if (i == 1 ) id = lua_tointeger(L,i);
if (i == 2 ) SectorZ = lua_tointeger(L,i);
UINT8 id = lua_tointeger( L, 1 );
UINT8 SectorZ = lua_tointeger( L, 2 );
gMercProfiles[id].bSectorZ = SectorZ;
}
return 0;
}
// set boxer ids back to NOBODY, so they can be reinitialised
static int l_ResetBoxers( lua_State *L )
{
for ( UINT8 i = 0; i < NUM_BOXERS; ++i )
{
gubBoxerID[i] = NOBODY;
gfBoxerFought[i] = FALSE;
}
gMercProfiles[ id ].bSectorZ = SectorZ;
return 0;
}