## ETPub PCR alpha hacks (etpub_pcr_ah) ## (C) 2006-2007 PatheticCockroach.com ## This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 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) Time to take care of some big fat XP system deficiencies... :) - performing First Aid gives 2 XP medic + 2 XP battle sense - add g_friendlyPlant flag 16 : lose 20 XP when destroying friendly obj, lose 2 XP when destroying friendly constructible ------------------------- MODIFICATION STARTS HERE src\game\g_cmds.c (line 4463) **** AFTER if(g_forceLimboHealth.integer == 1) limbo_health = FORCE_LIMBO_HEALTH2; else if(g_forceLimboHealth.integer>10) limbo_health = 0 - g_forceLimboHealth.integer; healamt = 10 - (traceEnt->health - limbo_health)*80/limbo_health; ReviveEntity(ent, traceEnt); **** ADD G_AddSkillPoints( ent, SK_FIRST_AID, 2.f ); G_DebugAddSkillPoints( ent, SK_FIRST_AID, 2.f, "firstaiding a player" ); G_AddSkillPoints( ent, SK_BATTLE_SENSE, 2.f ); G_DebugAddSkillPoints( ent, SK_BATTLE_SENSE, 2.f, "firstaiding a player" ); src\game\g_missile.c (line 429) **** REPLACE if ( ((hit->spawnflags & AXIS_OBJECTIVE) && (ent->s.teamNum == TEAM_ALLIES)) || ((hit->spawnflags & ALLIED_OBJECTIVE) && (ent->s.teamNum == TEAM_AXIS)) || (g_friendlyPlant.integer & FRIENDLYPLANT_BLOW) ) { if( ent->parent->client && G_GetWeaponClassForMOD( MOD_DYNAMITE ) >= hit->target_ent->constructibleStats.weaponclass ) { G_AddKillSkillPointsForDestruction( ent->parent, MOD_DYNAMITE, &hit->target_ent->constructibleStats ); } G_UseTargets( hit, ent ); hit->think = G_FreeEntity; hit->nextthink = level.time + FRAMETIME; } **** WITH if ( ((hit->spawnflags & AXIS_OBJECTIVE) && (ent->s.teamNum == TEAM_ALLIES)) || ((hit->spawnflags & ALLIED_OBJECTIVE) && (ent->s.teamNum == TEAM_AXIS))) { if( ent->parent->client && G_GetWeaponClassForMOD( MOD_DYNAMITE ) >= hit->target_ent->constructibleStats.weaponclass ) { G_AddKillSkillPointsForDestruction( ent->parent, MOD_DYNAMITE, &hit->target_ent->constructibleStats ); } G_UseTargets( hit, ent ); hit->think = G_FreeEntity; hit->nextthink = level.time + FRAMETIME; } else if (g_friendlyPlant.integer & FRIENDLYPLANT_BLOW) { if( ent->parent->client && G_GetWeaponClassForMOD( MOD_DYNAMITE ) >= hit->target_ent->constructibleStats.weaponclass ) { if (g_friendlyPlant.integer & FRIENDLYPLANT_PENALTY) { G_LoseSkillPoints( ent->parent, SK_EXPLOSIVES_AND_CONSTRUCTION, 20 ); } else { G_AddKillSkillPointsForDestruction( ent->parent, MOD_DYNAMITE, &hit->target_ent->constructibleStats ); } } G_UseTargets( hit, ent ); hit->think = G_FreeEntity; hit->nextthink = level.time + FRAMETIME; } src\game\g_mover.c (line 4592) **** AFTER void func_constructible_explode( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int damage, int mod ) { **** ADD int friendlyObj=0; if( (g_friendlyPlant.integer & FRIENDLYPLANT_PENALTY) && self && inflictor && (G_GetTeamFromEntity( self ) == G_GetTeamFromEntity( inflictor )) ) { friendlyObj=2; } (line 4708, 4745 and 4780) **** REPLACE // Skills stuff if( G_GetWeaponClassForMOD( mod ) >= self->constructibleStats.weaponclass ) { G_AddKillSkillPointsForDestruction( attacker, mod, &self->constructibleStats ); } **** WITH // Skills stuff if( G_GetWeaponClassForMOD( mod ) >= self->constructibleStats.weaponclass ) { if(friendlyObj==0) G_AddKillSkillPointsForDestruction( attacker, mod, &self->constructibleStats ); else G_LoseSkillPoints( attacker, SK_EXPLOSIVES_AND_CONSTRUCTION, friendlyObj ); } src\game\bg_public.h (line 926) **** AFTER // can build opfor obj #define FRIENDLYPLANT_BUILD 8 **** ADD // player loses XP for destroying friendly stuff #define FRIENDLYPLANT_PENALTY 16 ------------------------- PERSONAL NOTES G_AddSkillPoints( ent, SK_FIRST_AID, 4.f ); G_DebugAddSkillPoints( ent, SK_FIRST_AID, 4.f, "reviving a player" ); cgs.media.skillPics[SK_BATTLE_SENSE] = trap_R_RegisterShaderNoMip( "gfx/limbo/ic_battlesense" ); cgs.media.skillPics[SK_EXPLOSIVES_AND_CONSTRUCTION] = trap_R_RegisterShaderNoMip( "gfx/limbo/ic_engineer" ); cgs.media.skillPics[SK_FIRST_AID] = trap_R_RegisterShaderNoMip( "gfx/limbo/ic_medic" ); cgs.media.skillPics[SK_SIGNALS] = trap_R_RegisterShaderNoMip( "gfx/limbo/ic_fieldops" ); cgs.media.skillPics[SK_LIGHT_WEAPONS] = trap_R_RegisterShaderNoMip( "gfx/limbo/ic_lightweap" ); cgs.media.skillPics[SK_HEAVY_WEAPONS] = trap_R_RegisterShaderNoMip( "gfx/limbo/ic_soldier" ); cgs.media.skillPics[SK_MILITARY_INTELLIGENCE_AND_SCOPED_WEAPONS] = trap_R_RegisterShaderNoMip( "gfx/limbo/ic_covertops" ); G_AddKillSkillPointsForDestruction func_explosive_explode func_constructible_explode ent->die = func_constructible_explode; targ->die( targ, inflictor, attacker, take, mod ); if( (G_GetTeamFromEntity( inflictor ) == G_GetTeamFromEntity( targ )) && !(g_friendlyPlant.integer & FRIENDLYPLANT_HURT) ) {