## 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) Client have the possibility to display icons instead of class names (see rev 64 and 68). This revision adds the class icon fonctionality to fireteam members. + fix of the bug where fireteam members 7 and 8 would be drawn outside the fireteam box. ------------------------- MODIFICATION STARTS HERE src\cgame\cg_fireteamoverlay.c (line 390) **** REPLACE CG_Text_Paint_Ext( x, y + FT_BAR_HEIGHT, .2f, .2f, tclr, BG_ClassLetterForNumber( ci->cls ), 0, 0, ITEM_TEXTSTYLE_SHADOWED, &cgs.media.font3 ); x += 10; **** WITH if(cg_icon4class.integer==0) CG_Text_Paint_Ext( x, y + FT_BAR_HEIGHT, .2f, .2f, tclr, BG_ClassLetterForNumber( ci->cls ), 0, 0, ITEM_TEXTSTYLE_SHADOWED, &cgs.media.font3 ); else CG_DrawPic( x - 7, y + FT_BAR_HEIGHT - 12, 20, 20, cgs.media.limboClassButtons2[ci->cls] ); x += 10; /*WeapSize = weapIconDrawSize(ci->weapon); if(WeapSize>0) CG_DrawPic( x, y + FT_BAR_HEIGHT - 6, 10*WeapSize, 10, cg_weapons[ ci->weapon ].weaponIcon[1] ); CG_Text_Paint_Ext( x, y + FT_BAR_HEIGHT+10, .2f, .2f, tclr, BG_ClassLetterForNumber( ci->curWeapon ), 0, 0, ITEM_TEXTSTYLE_SHADOWED, &cgs.media.font3 ); x += 20;*/ (line 349) **** REPLACE for(i = 0; i < 6; i++) { ci = CG_SortedFireTeamPlayerForPosition( i ); if(!ci) { break;; } h += FT_BAR_HEIGHT + FT_BAR_YSPACING; } **** WITH for(i = 0; i < MAX_FIRETEAM_MEMBERS; i++) { ci = CG_SortedFireTeamPlayerForPosition( i ); if(!ci) { break;; } h += FT_BAR_HEIGHT + FT_BAR_YSPACING; } src\cgame\cg_fireteamoverlay.c (line 373) **** AFTER for(i = 0; i < MAX_FIRETEAM_MEMBERS; i++) { **** ADD //int WeapSize; ------------------------- PERSONAL NOTES Commented out stuff is an attempt to draw players' weapons. It worked but didn't update when unless player respawn. size = weapIconDrawSize(realweap); if(size == 1) { // draw half width to match the icon asset