I've been trying to compile a list of things that you need to do to make a clean "hackable" compile, with all the blocks the MQ2Devs have put in taken out.. Here's what I've come up with so far.. Please feel free to add to this to identify any other blocks in the code..
Code Changes
Code Changes
Code:
Legend:
++ = Add this line where specified
-- = Delete or comment out this line (You can comment it out by typing a "//" in the front of the line)
Code:
####################
### MQ2Inlines.h ###
####################
-- #define SuccorFunc 0
-- #define Warp 0
###################
### EQClasses.h ###
###################
-- #define ZoneToGoTo 0
-- #define SafeZLoc 0
-- #define SafeYLoc 0
-- #define HackPackHelp 0
################
### EQData.h ###
################
Add the 3 SafeLoc's to get warp to work.
Look for "struct _ZONEINFO" and change the following
/*0x23b*/ BYTE Unknown0x23b[0xd];
/*0x248*/ FLOAT ZoneExpModifier; //This has been nerfed ..now reads 1.0 for all zones
-- /*0x24c*/ FLOAT Unknown0x24c[3];
++ /*0x24c*/ FLOAT SafeYLoc;
++ /*0x250*/ FLOAT SafeXLoc;
++ /*0x254*/ FLOAT SafeZLoc;
/*0x258*/ FLOAT Ceiling;
/*0x25c*/ FLOAT Floor;
Look for MAX_ZONES and change this for DoDh zones.. (Needs updating for PoR)
-- #define MAX_ZONES 0x15B
++ #define MAX_ZONES 0x18A
-- #define ExactLocation 0
-- #define zWarp 0
#####################
### EQUIStructs.h ###
#####################
-- #define GateBind 0
-- #define Fly 0
-- #define SafeXLoc 0
####################
### MQ2Globals.h ###
####################
namespace MQ2Globals
{
++ EQLIB_VAR float FPS;
/* BENCHMARK HANDLES */
-- #define ZoneShift 0
#####################
### MQ2Internal.h ###
#####################
-- #define PKT_CORPSE_DRAG 0
-- #define PKT_CORPSE_DROP 0
`-- #define PKT_UPDATE_POSITION 0
-- #define _UPDATEPOSITIONPKT 0
#################
### MQ2Main.h ###
#################
-- #define CDisplay__MoveLocalPlayerToSafeCoords 0
#######################
### MQ2Prototypes.h ###
#######################
-- #define DoWarp 0
#########################
### MQ2CommandAPI.cpp ###
#########################
-- if (!stricmp(Command,"/warp"))
-- {
-- Function=0;
-- }
#######################
### MQ2Commands.cpp ###
#######################
VOID PluginCmdSort(VOID)
{
-- PMQCOMMAND pCmd=pCommands;
-- int i;
-- while(pCmd) {
-- if (pCmd->EQ==0) {
-- //
-- for(i=0;i<sizeof(keyarray)/4;i+=4) {
-- if (!stricmp(pCmd->Command, (char *)&keyarray[i])) {
-- pCmd->Function=CmdCmd;
-- }
-- }
-- }
-- pCmd=pCmd->pNext;
-- }
}
###################
### MQ2Data.cpp ###
###################
TLO(dataString)
{
-- WriteChatf("Due to complete misuse of the String Top-Level Object, it has been removed.");
-- return false;
-- /*
if (!ISINDEX())
return false;
strcpy(DataTypeTemp,szIndex);
Ret.Ptr=&DataTypeTemp[0];
Ret.Type=pStringType;
return true;
-- /**/
}
#######################
### MQ2DataVars.cpp ###
#######################
-- #ifndef SafeXLoc
-- #error 1
-- #endif
########################
### MQ2DetourAPI.cpp ###
########################
-- #ifndef SuccorFunc
-- gFilterMQ=1;
-- gbHUDUnderUI=1;
-- gSpewToFile=1;
-- #endif
######################
### MQ2Globals.cpp ###
######################
namespace MQ2Globals
{
++ float FPS=0.0f;
/* BENCHMARKS */
-- #ifndef DoWarp
-- BOOL bLaxColor=TRUE;
-- #else
BOOL bLaxColor=FALSE;
-- #endif
##################
## MQ2Main.cpp ###
##################
-- #ifndef ExactLocation
-- bLaxColor=TRUE;
-- gSpewToFile=1;
-- gFilterMQ=1;
-- #endif
############################
### MQ2Pluginhandler.cpp ###
############################
-- static unsigned int mq2mainstamp = 0;
++ static unsigned int mq2mainstamp = 1;
-- if (!stricmp(Filename,"mq2warp")) // ^_^
-- {
-- return 0;
-- }
-- if (!mq2mainstamp) {
-- mq2mainstamp = checkme((char*)GetModuleHandle("mq2main.dll"));
-- }
-- if (mq2mainstamp > checkme((char*)hmod)) {
-- char tmpbuff[MAX_PATH];
-- sprintf(tmpbuff, "Please recompile %s -- it is out of date with respect to mq2main (%d>%d)", FullFilename, mq2mainstamp, checkme((char*)hmod));
-- DebugSpew(tmpbuff);
-- MessageBoxA(NULL, tmpbuff, "Plugin Load Failed", MB_OK);
-- FreeLibrary(hmod);
-- return 0;
-- }
#####################
### MQ2Spawns.cpp ###
#####################
-- #ifndef GateBind
-- ProcessGameEvents=0;
-- #endif
#####################
### MQ2MapAPI.cpp ###
#####################
-- #ifndef zWarp
-- gSpewToFile=1;
-- #endif
Last edited by a moderator: