From prboom-users-admin@lists.sourceforge.net Sun Jan 30 15:32:55 2005 Return-Path: Delivered-To: flaterco-flaterco:com-dave@flaterco.com X-Envelope-To: dave@flaterco.com Received: (qmail 51588 invoked by uid 3110); 30 Jan 2005 15:32:55 -0000 Delivered-To: flaterco-flaterco:com-doom@flaterco.com Received: (qmail 51581 invoked from network); 30 Jan 2005 15:32:54 -0000 Received: from lists-outbound.sourceforge.net (66.35.250.225) by tama.pair.com with SMTP; 30 Jan 2005 15:32:54 -0000 Received: from projects.sourceforge.net (sc8-sf-list2-b.sourceforge.net [10.3.1.8]) by sc8-sf-spam2.sourceforge.net (Postfix) with ESMTP id 0C3711328E; Sun, 30 Jan 2005 07:28:43 -0800 (PST) Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.11] helo=sc8-sf-mx1.sourceforge.net) by sc8-sf-list2.sourceforge.net with esmtp (Exim 4.30) id 1CvGyZ-0004eG-1N for prboom-users@lists.sourceforge.net; Sun, 30 Jan 2005 07:26:59 -0800 Received: from relay03.pair.com ([209.68.5.17]) by sc8-sf-mx1.sourceforge.net with smtp (Exim 4.41) id 1CvGyY-0007ob-2A for prboom-users@lists.sourceforge.net; Sun, 30 Jan 2005 07:26:58 -0800 Received: (qmail 20004 invoked from network); 30 Jan 2005 15:26:56 -0000 Received: from unknown (HELO ?192.168.1.47?) (unknown) by unknown with SMTP; 30 Jan 2005 15:26:56 -0000 X-pair-Authenticated: 138.88.212.33 Message-ID: <41FCFCC8.5040507@flaterco.com> From: David Flater User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040919 X-Accept-Language: en-us, en MIME-Version: 1.0 To: prboom-users@lists.sourceforge.net Content-Type: multipart/mixed; boundary="------------070307050801060400000305" X-Spam-Score: 0.1 (/) X-Spam-Report: Spam Filtering performed by sourceforge.net. See http://spamassassin.org/tag/ for more details. Report problems to http://sf.net/tracker/?func=add&group_id=1&atid=200001 0.0 SF_CHICKENPOX_PARATHESES_OPEN BODY: Text interparsed with ( 0.0 SF_CHICKENPOX_PARATHESES_CLOSE BODY: Text interparsed with ) 0.0 SF_CHICKENPOX_PERIOD BODY: Text interparsed with . 0.0 SF_CHICKENPOX_COMMA BODY: Text interparsed with , 0.0 SF_CHICKENPOX_SLASH BODY: Text interparsed with / 0.0 SF_CHICKENPOX_MINUS BODY: Text interparsed with - 0.0 SF_CHICKENPOX_BRACKET_OPEN BODY: Text interparsed with [ 0.0 SF_CHICKENPOX_UNDERSCORE BODY: Text interparsed with _ 0.0 SF_CHICKENPOX_ASTERISK BODY: Text interparsed with * 0.0 SF_CHICKENPOX_LESSTHAN BODY: Text interparsed with < 0.0 SF_CHICKENPOX_EQUAL BODY: Text interparsed with = 0.0 SF_CHICKENPOX_SEMICOLON BODY: Text interparsed with ; 0.0 SF_CHICKENPOX_APOSTROPHE BODY: Text interparsed with ' -0.0 AWL AWL: From: address is in the auto white-list Subject: [Prboom-users] one bugfix and three new cheats Sender: prboom-users-admin@lists.sourceforge.net Errors-To: prboom-users-admin@lists.sourceforge.net X-BeenThere: prboom-users@lists.sourceforge.net X-Mailman-Version: 2.0.9-sf.net Precedence: bulk Reply-To: prboom-users@lists.sourceforge.net List-Unsubscribe: , List-Id: List-Post: List-Help: List-Subscribe: , List-Archive: X-Original-Date: Sun, 30 Jan 2005 10:27:04 -0500 Date: Sun, 30 Jan 2005 10:27:04 -0500 Status: RO Content-Length: 10304 Lines: 354 This is a multi-part message in MIME format. --------------070307050801060400000305 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit The attached patch against PrBoom 2.3.1 fixes one apparent bug and adds three new cheat codes. The bug is a fencepost error in the BFG code that causes the spread of BFG damage to extend slightly farther on the left than on the right. This might be a classic Doom bug that was retained for compatibility reasons; I don't remember. (If so, a source code comment would be in order.) The new cheat codes are: dwfa Make ammo effectively infinite (no need to replenish as with idfa). Repeat code to start using ammo again. dwfr Give player weapons 5, 6, and 7, and change behavior of weapons 6 and 7 to fire rockets instead of plasma. The plasma gun becomes a rapid-fire rocket launcher; the BFG launches a spray of rockets. Repeat code to revert to normal behavior. dwfb Add 150 barrels at random places. Warning: overuse will lead to a critical mass of barrels and an apocalyptic chain reaction. Regards, DWF --------------070307050801060400000305 Content-Type: text/plain; name="prboom-2.3.1-dwf.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="prboom-2.3.1-dwf.patch" diff -cr prboom-2.3.1/src/d_player.h prboom-2.3.1-dwf/src/d_player.h *** prboom-2.3.1/src/d_player.h 2004-09-15 15:09:39.000000000 -0400 --- prboom-2.3.1-dwf/src/d_player.h 2005-01-23 07:24:11.000000000 -0500 *************** *** 81,87 **** // No damage, no health loss. CF_GODMODE = 2, // Not really a cheat, just a debug aid. ! CF_NOMOMENTUM = 4 } cheat_t; --- 81,91 ---- // No damage, no health loss. CF_GODMODE = 2, // Not really a cheat, just a debug aid. ! CF_NOMOMENTUM = 4, ! // DWF rocket man cheat ! CF_ROCKETMAN = 8, ! // DWF infinite ammo cheat ! CF_MAGICAMMO = 16 } cheat_t; diff -cr prboom-2.3.1/src/m_cheat.c prboom-2.3.1-dwf/src/m_cheat.c *** prboom-2.3.1/src/m_cheat.c 2004-09-15 15:09:29.000000000 -0400 --- prboom-2.3.1-dwf/src/m_cheat.c 2005-01-23 11:54:06.000000000 -0500 *************** *** 42,47 **** --- 42,48 ---- #include "dstrings.h" #include "r_main.h" #include "d_deh.h" // Ty 03/27/98 - externalized strings + #include #define plyr (&players[consoleplayer]) /* the console player */ *************** *** 82,87 **** --- 83,91 ---- static void cheat_pitch(); static void cheat_megaarmour(); static void cheat_health(); + static void cheat_magicammo(); + static void cheat_rocketman(); + static void cheat_morebarrels(); //----------------------------------------------------------------------------- // *************** *** 252,257 **** --- 256,270 ---- {"tntpush", NULL, not_net | not_demo, cheat_pushers }, // phares 3/10/98: toggle pushers + {"dwfa", NULL, not_net | not_demo, + cheat_magicammo }, + + {"dwfr", NULL, not_net | not_demo, + cheat_rocketman }, + + {"dwfb", NULL, not_net | not_demo, + cheat_morebarrels}, + {NULL} // end-of-list marker }; *************** *** 321,326 **** --- 334,393 ---- doom_printf(s_STSTR_DQDOFF); // Ty 03/27/98 - externalized } + // DWF + static void cheat_magicammo() { + int i; + plyr->cheats ^= CF_MAGICAMMO; + if (plyr->cheats & CF_MAGICAMMO) + for (i=0;iammo[i] = plyr->maxammo[i]; + } + + // DWF + static void cheat_rocketman() { + plyr->cheats ^= CF_ROCKETMAN; + if (plyr->cheats & CF_ROCKETMAN) { + plyr->weaponowned[wp_missile] = true; + if (gamemode != shareware) + plyr->weaponowned[wp_plasma] = plyr->weaponowned[wp_bfg] = true; + } + } + + // DWF + static void cheat_morebarrels() { + static int initrand = 0; + if (!initrand) { + initrand = 1; + srand(time(NULL)); + } + + // Bounds code copied from p_setup.c P_CreateBlockMap() + int map_minx=INT_MAX; + int map_miny=INT_MAX; + int map_maxx=INT_MIN; + int map_maxy=INT_MIN; + int i; + for (i=0;i map_maxx) + map_maxx = t; + if ((t=vertexes[i].y) < map_miny) + map_miny = t; + else if (t > map_maxy) + map_maxy = t; + } + + for (i=0; i<150; i++) { + int x, y; + x = map_minx + (map_maxx - map_minx) * (float)rand()/RAND_MAX; + y = map_miny + (map_maxy - map_miny) * (float)rand()/RAND_MAX; + P_SpawnMobj (x, y, ONCEILINGZ, MT_BARREL); + } + } + // CPhipps - new health and armour cheat codes static void cheat_health() { *************** *** 760,763 **** C_AddCommand(noclip); //C_AddCommand(nuke); } - --- 827,829 ---- diff -cr prboom-2.3.1/src/p_pspr.c prboom-2.3.1-dwf/src/p_pspr.c *** prboom-2.3.1/src/p_pspr.c 2004-09-15 15:09:22.000000000 -0400 --- prboom-2.3.1-dwf/src/p_pspr.c 2005-01-23 12:13:24.000000000 -0500 *************** *** 568,574 **** void A_FireMissile(player_t *player, pspdef_t *psp) { ! player->ammo[weaponinfo[player->readyweapon].ammo]--; P_SpawnPlayerMissile(player->mo, MT_ROCKET); } --- 568,575 ---- void A_FireMissile(player_t *player, pspdef_t *psp) { ! if (!(player->cheats & CF_MAGICAMMO)) ! player->ammo[weaponinfo[player->readyweapon].ammo]--; P_SpawnPlayerMissile(player->mo, MT_ROCKET); } *************** *** 578,585 **** void A_FireBFG(player_t *player, pspdef_t *psp) { ! player->ammo[weaponinfo[player->readyweapon].ammo] -= BFGCELLS; ! P_SpawnPlayerMissile(player->mo, MT_BFG); } /* --- 579,597 ---- void A_FireBFG(player_t *player, pspdef_t *psp) { ! if (!(player->cheats & CF_MAGICAMMO)) ! player->ammo[weaponinfo[player->readyweapon].ammo] -= BFGCELLS; ! if (!(player->cheats & CF_ROCKETMAN)) ! P_SpawnPlayerMissile(player->mo, MT_BFG); ! else { ! int i, num_rockets = 45; ! angle_t orig_an = player->mo->angle; ! for (i=0; i<=num_rockets; i++) { ! player->mo->angle = orig_an - ANG90/2 + ANG90/num_rockets*i; ! P_SpawnPlayerMissile(player->mo, MT_ROCKET); ! } ! player->mo->angle = orig_an; ! } } /* *************** *** 602,611 **** void A_FirePlasma(player_t *player, pspdef_t *psp) { ! player->ammo[weaponinfo[player->readyweapon].ammo]--; A_FireSomething(player,P_Random(pr_plasma)&1); // phares ! P_SpawnPlayerMissile(player->mo, MT_PLASMA); } // --- 614,625 ---- void A_FirePlasma(player_t *player, pspdef_t *psp) { ! if (!(player->cheats & CF_MAGICAMMO)) ! player->ammo[weaponinfo[player->readyweapon].ammo]--; A_FireSomething(player,P_Random(pr_plasma)&1); // phares ! P_SpawnPlayerMissile(player->mo, ! player->cheats & CF_ROCKETMAN ? MT_ROCKET : MT_PLASMA); } // *************** *** 661,667 **** S_StartSound(player->mo, sfx_pistol); P_SetMobjState(player->mo, S_PLAY_ATK2); ! player->ammo[weaponinfo[player->readyweapon].ammo]--; A_FireSomething(player,0); // phares P_BulletSlope(player->mo); --- 675,682 ---- S_StartSound(player->mo, sfx_pistol); P_SetMobjState(player->mo, S_PLAY_ATK2); ! if (!(player->cheats & CF_MAGICAMMO)) ! player->ammo[weaponinfo[player->readyweapon].ammo]--; A_FireSomething(player,0); // phares P_BulletSlope(player->mo); *************** *** 679,685 **** S_StartSound(player->mo, sfx_shotgn); P_SetMobjState(player->mo, S_PLAY_ATK2); ! player->ammo[weaponinfo[player->readyweapon].ammo]--; A_FireSomething(player,0); // phares --- 694,701 ---- S_StartSound(player->mo, sfx_shotgn); P_SetMobjState(player->mo, S_PLAY_ATK2); ! if (!(player->cheats & CF_MAGICAMMO)) ! player->ammo[weaponinfo[player->readyweapon].ammo]--; A_FireSomething(player,0); // phares *************** *** 699,705 **** S_StartSound(player->mo, sfx_dshtgn); P_SetMobjState(player->mo, S_PLAY_ATK2); ! player->ammo[weaponinfo[player->readyweapon].ammo] -= 2; A_FireSomething(player,0); // phares --- 715,722 ---- S_StartSound(player->mo, sfx_dshtgn); P_SetMobjState(player->mo, S_PLAY_ATK2); ! if (!(player->cheats & CF_MAGICAMMO)) ! player->ammo[weaponinfo[player->readyweapon].ammo] -= 2; A_FireSomething(player,0); // phares *************** *** 731,737 **** return; P_SetMobjState(player->mo, S_PLAY_ATK2); ! player->ammo[weaponinfo[player->readyweapon].ammo]--; A_FireSomething(player,psp->state - &states[S_CHAIN1]); // phares --- 748,755 ---- return; P_SetMobjState(player->mo, S_PLAY_ATK2); ! if (!(player->cheats & CF_MAGICAMMO)) ! player->ammo[weaponinfo[player->readyweapon].ammo]--; A_FireSomething(player,psp->state - &states[S_CHAIN1]); // phares *************** *** 764,770 **** { int i; ! for (i=0 ; i<40 ; i++) // offset angles from its attack angle { int j, damage; angle_t an = mo->angle - ANG90/2 + ANG90/40*i; --- 782,789 ---- { int i; ! // DWF fixed fencepost error 2005-01-23 ! for (i=0 ; i<=40 ; i++) // offset angles from its attack angle { int j, damage; angle_t an = mo->angle - ANG90/2 + ANG90/40*i; --------------070307050801060400000305-- ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Prboom-users mailing list Prboom-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/prboom-users