## ETPub PCR alpha hacks (etpub_pcr_ah) ## (C) 2006-2007 PatheticCockroach.com ## This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License ## Derivative works may only be done if they are distributed with their source code. ## ## The original etpub_pcr_ah source and binaries can be found around http://www.patheticcockroach.com/etserver/etpub_pcr.php ## ## Note : ETPub PCR alpha hacks are just small modifications for ETPub (http://www.etpub.org) ------------------------- MODIFICATION STARTS HERE 1740 (more g_medicHealthRegen options) : NOT applied because we already have better 1741 (interface for Omni-Bot 0.65) : applied with modifications : -> files within trunk/Omnibot : all copied without modifications -> g_client.c, g_cmds.c, g_combat.c : updated manually -> g_etbot_interface.cpp : copied and then : * from rev 15 (line 2127) **** REPLACE _max = maxclip + BG_MaxAmmoForWeapon((weapon_t)_ammotype, bot->client->sess.skill); **** WITH _max = maxclip + BG_MaxAmmoForWeapon((weapon_t)_ammotype, bot->client->sess.skill, bot->client->sess.playerType); (line 3205) **** REPLACE BG_CanItemBeGrabbed(&pFlagEnt->s, &pEnt->client->ps, pEnt->client->sess.skill, pEnt->client->sess.sessionTeam) ? True : False; **** WITH BG_CanItemBeGrabbed(&pFlagEnt->s, &pEnt->client->ps, pEnt->client->sess.skill, pEnt->client->sess.sessionTeam, pEnt->client->sess.playerType) ? True : False; * from rev 42 (line 2809) **** REPLACE // Dens: don't forget to look if the pEnt SHOULD really be in limbo // this check prevenst extra bodies and weird spectator behaviour int limbo_health = FORCE_LIMBO_HEALTH; #ifdef FORCE_LIMBO_HEALTH2 if(g_forceLimboHealth.integer == 1){ limbo_health = FORCE_LIMBO_HEALTH2; } #endif **** WITH // Dens: don't forget to look if the pEnt SHOULD really be in limbo // this check prevenst extra bodies and weird spectator behaviour int limbo_health = FORCE_LIMBO_HEALTH; #ifdef FORCE_LIMBO_HEALTH2 if(g_forceLimboHealth.integer == 1){ limbo_health = FORCE_LIMBO_HEALTH2; } else if(g_forceLimboHealth.integer>10) limbo_health = 0 - g_forceLimboHealth.integer; #endif -> g_etbot_interface.h : copied without modifications -> g_local.h, g_main.c, g_missile.c, g_script.c, g_script_actions.c, g_team.c, g_weapon.c, g_xpsave.c, game.vcproj : updated manually game.dsp : (line 176) **** BEFORE SOURCE=.\etpro_mdx.c # End Source File # Begin Source File **** ADD SOURCE=..\..\Omnibot\Common\BotLoadLibrary.cpp # End Source File # Begin Source File 1742 (trunk/Omnibot/Common/BotLoadLibrary.cpp file) : applied 1743 (minor code tweaks) : applied 1744 (minor code tweaks) : applied 1745 (minor code tweaks) : applied 1746 (scons scripts) : applied 1747 (compilation fixes) : applied 1748 (support for older GCC) : applied 1749 (fixes rev 1748) : NOT applied since we didn't aply rev 1748 1750 (compilation fixes) : applied 1751 and 1752 (moved BotLoadLibrary.cpp, added antiwarp) : applied 1753 (reverted back scons script ??) : NOT applied (was a mistake I suppose) 1754 (changelog update) : NOT applied 1755 (updated VC project files) : applied with modifications : src/game/game.vcproj : **** REPLACE **** WITH game.dsp : **** REPLACE SOURCE=..\..\Omnibot\Common\BotLoadLibrary.cpp # End Source File # Begin Source File **** WITH SOURCE=.\BotLoadLibrary.cpp # End Source File # Begin Source File SOURCE=.\et-antiwarp.c # End Source File # Begin Source File src/game/BotLoadLibrary.cpp (line 53) **** REPLACE static char pathstr[iBufferSize] = {}; **** WITH static char pathstr[iBufferSize] = {0}; src/game/g_etbot_interface.cpp (line 1544) **** REPLACE Msg_Addbot *pMsg = (Msg_Addbot *)_data->Get2(sizeof(Msg_Addbot)); **** WITH Msg_Addbot *pMsg = (Msg_Addbot *)_data.Get2(sizeof(Msg_Addbot)); **** REPLACE the old pfnAddBot function **** WITH static int pfnAddBot(const MessageHelper &_data) { #ifdef VC6 //Msg_Addbot *pMsg = (Msg_Addbot *)_data.Get2(sizeof(Msg_Addbot)); //Msg_Addbot *pMsg; #else Msg_Addbot *pMsg = _data.Get(); #endif int num; char userinfo[MAX_INFO_STRING] = {0}; gentity_t* bot; num = trap_BotAllocateClient(0); std::stringstream guid; guid << "OMNIBOT" << std::setw(2) << std::setfill('0') << num << std::setw(23) << ""; if (num < 0) { pfnPrintError("Could not add bot!"); pfnPrintError("No free slots!"); return -1; } bot = &g_entities[num]; #ifdef VC6 std::stringstream PCR_bot_name; PCR_bot_name << "omni-bot #" << num; Info_SetValueForKey(userinfo, "name", PCR_bot_name.str().c_str()); #else Info_SetValueForKey(userinfo, "name", pMsg->m_Name); #endif Info_SetValueForKey(userinfo, "rate", "25000"); Info_SetValueForKey(userinfo, "snaps", "20"); Info_SetValueForKey(userinfo, "ip", "localhost"); Info_SetValueForKey(userinfo, "cl_guid", guid.str().c_str()); trap_SetUserinfo(num, userinfo); const char *s = 0; if(s = ClientConnect(num, qtrue, qtrue)) { pfnPrintError(va("Could not connect bot: %s", s)); num = -1; } return num; } Omnibot/ET/ET_Config.h **** REPLACE #include "Omni-Bot_Events.h" **** WITH #include "../Common/Omni-Bot_Events.h" 1756 (scons script again) : NOT applied (we already had this) ------------------------- PERSONAL NOTES