mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 14:25:38 +03:00
fixed amb291 issue
This commit is contained in:
parent
fcdd17480c
commit
6a483cfcae
@ -1719,10 +1719,9 @@ static cell AMX_NATIVE_CALL cs_get_c4_defusing(AMX* amx, cell* params)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return *((char*)((REAL*)pC4->pvPrivateData + OFFSET_C4_DEFUSING)) ? 1 : 0;
|
return *(bool *)((char *)(pC4->pvPrivateData) + OFFSET_C4_DEFUSING) ? 1 : 0;
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL cs_set_c4_defusing(AMX* amx, cell* params)
|
static cell AMX_NATIVE_CALL cs_set_c4_defusing(AMX* amx, cell* params)
|
||||||
{
|
{
|
||||||
CHECK_NONPLAYER(params[1]);
|
CHECK_NONPLAYER(params[1]);
|
||||||
|
@ -47,9 +47,11 @@
|
|||||||
#if defined __linux__
|
#if defined __linux__
|
||||||
#define EXTRAOFFSET 5 // offsets 5 higher in Linux builds
|
#define EXTRAOFFSET 5 // offsets 5 higher in Linux builds
|
||||||
#define EXTRAOFFSET_WEAPONS 4 // weapon offsets are obviously only 4 steps higher on Linux!
|
#define EXTRAOFFSET_WEAPONS 4 // weapon offsets are obviously only 4 steps higher on Linux!
|
||||||
|
#define ACTUAL_EXTRA_OFFSET 20 // actual, byte-addressable offset
|
||||||
#else
|
#else
|
||||||
#define EXTRAOFFSET 0 // no change in Windows builds
|
#define EXTRAOFFSET 0 // no change in Windows builds
|
||||||
#define EXTRAOFFSET_WEAPONS 0
|
#define EXTRAOFFSET_WEAPONS 0
|
||||||
|
#define ACTUAL_EXTRA_OFFSET 0
|
||||||
#endif // defined __linux__
|
#endif // defined __linux__
|
||||||
/*
|
/*
|
||||||
Offset history:
|
Offset history:
|
||||||
@ -111,7 +113,7 @@
|
|||||||
#define OFFSET_ARMOURY_TYPE 34 + EXTRAOFFSET_WEAPONS
|
#define OFFSET_ARMOURY_TYPE 34 + EXTRAOFFSET_WEAPONS
|
||||||
// C4 offsets
|
// C4 offsets
|
||||||
#define OFFSET_C4_EXPLODE_TIME 100 + EXTRAOFFSET
|
#define OFFSET_C4_EXPLODE_TIME 100 + EXTRAOFFSET
|
||||||
#define OFFSET_C4_DEFUSING 0x60 + EXTRAOFFSET
|
#define OFFSET_C4_DEFUSING 0x180 + ACTUAL_EXTRA_OFFSET
|
||||||
#else
|
#else
|
||||||
// Amd64 offsets here
|
// Amd64 offsets here
|
||||||
#define OFFSET_ARMORTYPE 137 + EXTRAOFFSET
|
#define OFFSET_ARMORTYPE 137 + EXTRAOFFSET
|
||||||
|
Loading…
Reference in New Issue
Block a user