Date: Wed, 20 Apr 2011 23:42:51 GMT From: Kalten <kalten@gmx.at> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/156536: games/heretic: adding respawnaritfacts and configurable shortkeys Message-ID: <201104202342.p3KNgp0O086835@red.freebsd.org> Resent-Message-ID: <201104202350.p3KNo9A7066533@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 156536 >Category: ports >Synopsis: games/heretic: adding respawnaritfacts and configurable shortkeys >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Apr 20 23:50:08 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Kalten >Release: 8.2-RELEASE >Organization: >Environment: FreeBSD freeHugin.Walhalla.Leben 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: Adding: *) -respawnartifacts parameter *) konfigurable shortkeys in heretic.cfg: -) key_health defaulting to 'a': health-quarz (magenta) -) key_tomeofpower defaulting to 127 (Backspace): (now configurable) -) key_egg defaulting to 'q'. -) key_firebomb defaulting to 'b'. >How-To-Repeat: >Fix: Patch attached with submission follows: --- /dev/null 2011-04-21 01:13:21.000000000 +0200 +++ files/patch-d_main.c 2011-04-21 01:10:18.000000000 +0200 @@ -0,0 +1,25 @@ +--- d_main.c.ori Sun Mar 11 16:31:49 2007 ++++ d_main.c Sun Mar 11 16:33:46 2007 +@@ -690,6 +690,7 @@ + setbuf(stdout, NULL); + nomonsters = M_CheckParm("-nomonsters"); + respawnparm = M_CheckParm("-respawn"); ++ respawnartifacts = M_CheckParm("-respawnartifacts"); + ravpic = M_CheckParm("-ravpic"); + noartiskip = M_CheckParm("-noartiskip"); + debugmode = M_CheckParm("-debug"); +@@ -778,7 +779,13 @@ + { + deathmatch = true; + } +- ++ ++ if ( M_CheckParm("-respawnartifacts")!=0 ) ++ { ++ printf("Parameter: -respawnartifacts\n"); ++ respawnartifacts=1; ++ } ++ + p = M_CheckParm("-skill"); + if(p && p < myargc-1) + { --- /dev/null 2011-04-21 01:13:21.000000000 +0200 +++ files/patch-doomdef.h 2011-04-21 01:09:32.000000000 +0200 @@ -0,0 +1,19 @@ +--- doomdef.h.ori Sun Mar 4 15:43:44 2007 ++++ doomdef.h Sun Mar 4 15:57:04 2007 +@@ -681,6 +681,7 @@ + short ticdup __PACKED__ ; /* 1 = no duplication, 2-5 = dup for slow nets */ + short extratics __PACKED__ ; /* 1 = send a backup tic in every packet */ + short deathmatch __PACKED__ ; /* 1 = deathmatch */ ++ short respawnartifacts __PACKED__ ; /* respawn the artifacts? 1=yes */ + short savegame __PACKED__ ; /* -1 = new game, 0-5 = load savegame */ + short episode __PACKED__ ; /* 1-3 */ + short map __PACKED__ ; /* 1-9 */ +@@ -753,6 +754,8 @@ + extern boolean cdrom; /* true if cd-rom mode active ("-cdrom") */ + + extern boolean deathmatch; /* only if started as net death */ ++ ++extern boolean respawnartifacts; /* respawn the artifacts */ + + extern boolean netgame; /* only true if >1 player */ + --- /dev/null 2011-04-21 01:13:21.000000000 +0200 +++ files/patch-g_game.c 2011-04-21 01:11:49.000000000 +0200 @@ -0,0 +1,56 @@ +--- g_game.c.ori Sun Mar 4 15:44:07 2007 ++++ g_game.c Sun Mar 4 15:50:29 2007 +@@ -91,6 +91,7 @@ + boolean viewactive; + + boolean deathmatch; /* only if started as net death */ ++boolean respawnartifacts; /* respawning Artifacts */ + boolean netgame; /* only true if packets are broadcast */ + boolean playeringame[MAXPLAYERS]; + player_t players[MAXPLAYERS]; +@@ -122,6 +123,7 @@ + long key_right, key_left, key_up, key_down; + long key_strafeleft, key_straferight; + long key_fire, key_use, key_strafe, key_speed; ++long key_health, key_tomeofpower, key_egg, key_firebomb; + long key_flyup, key_flydown, key_flycenter; + long key_lookup, key_lookdown, key_lookcenter; + long key_invleft, key_invright, key_useartifact; +@@ -361,13 +363,34 @@ + } + } + } +- if(gamekeydown[127] && !cmd->arti ++ if(gamekeydown[key_tomeofpower] && !cmd->arti + && !players[consoleplayer].powers[pw_weaponlevel2]) + { +- gamekeydown[127] = false; ++ gamekeydown[key_tomeofpower] = false; + cmd->arti = arti_tomeofpower; + } +- ++ // Health by key: ++ if(gamekeydown[key_health] && !cmd->arti) ++ { ++ gamekeydown[key_health] = false; ++ cmd->arti = arti_health; ++ } ++ ++ // Egg by key: ++ if(gamekeydown[key_egg] && !cmd->arti) ++ { ++ gamekeydown[key_egg] = false; ++ cmd->arti = arti_egg; ++ } ++ ++ // Timebombe by key: ++ if(gamekeydown[key_firebomb] && !cmd->arti) ++ { ++ gamekeydown[key_firebomb] = false; ++ cmd->arti = arti_firebomb; ++ } ++ ++ + /* + * buttons + */ --- /dev/null 2011-04-21 01:13:21.000000000 +0200 +++ files/patch-m_misc.c 2011-04-21 01:12:09.000000000 +0200 @@ -0,0 +1,21 @@ +--- m_misc.c.ori Sun Mar 4 15:50:54 2007 ++++ m_misc.c Sun Mar 4 15:52:40 2007 +@@ -365,6 +365,7 @@ + extern long key_right, key_left, key_up, key_down; + extern long key_strafeleft, key_straferight; + extern long key_fire, key_use, key_strafe, key_speed; ++extern long key_health, key_tomeofpower, key_egg, key_firebomb; + extern long key_flyup, key_flydown, key_flycenter; + extern long key_lookup, key_lookdown, key_lookcenter; + extern long key_invleft, key_invright, key_useartifact; +@@ -447,6 +448,10 @@ + + { "key_fire", &key_fire, KEY_RCTRL, 1 }, + { "key_use", &key_use, ' ', 1 }, ++ { "key_health", &key_health, 'a' }, ++ { "key_tomeofpower", &key_tomeofpower, 127}, ++ { "key_egg", &key_egg, 'q'}, ++ { "key_firebomb", &key_firebomb, 'b'}, + { "key_strafe", &key_strafe, KEY_RALT, 1 }, + { "key_speed", &key_speed, KEY_RSHIFT, 1 }, + --- /dev/null 2011-04-21 01:13:21.000000000 +0200 +++ files/patch-p_inter.c 2011-04-21 01:12:32.000000000 +0200 @@ -0,0 +1,15 @@ +--- p_inter.c.ori Sun Mar 4 15:38:51 2007 ++++ p_inter.c Sun Mar 4 15:41:50 2007 +@@ -477,8 +477,10 @@ + void P_SetDormantArtifact(mobj_t *arti) + { + arti->flags &= ~MF_SPECIAL; +- if(deathmatch && (arti->type != MT_ARTIINVULNERABILITY) +- && (arti->type != MT_ARTIINVISIBILITY)) ++ if( ++ (deathmatch && (arti->type != MT_ARTIINVULNERABILITY) ++ && (arti->type != MT_ARTIINVISIBILITY)) ++ || (respawnartifacts) ) + { + P_SetMobjState(arti, S_DORMANTARTI1); + } --- /dev/null 2011-04-21 01:33:53.000000000 +0200 +++ files/patch-doc_Gamekeys.txt 2011-04-21 01:31:44.000000000 +0200 @@ -0,0 +1,13 @@ +--- doc/Gamekeys.txt.orig 1999-04-06 14:58:18.000000000 +0200 ++++ doc/Gamekeys.txt 2011-04-21 01:30:38.000000000 +0200 +@@ -9,6 +9,10 @@ + + key_fire: Control-key + key_use: Space-key ++key_health: 'a' ++key_tomeofpower: Backspace-key ++key_egg: 'q' ++key_firebomb: 'b' + key_strafe: Alt/Meta-key + key_speed: Shift-key + --- /dev/null 2011-04-21 01:33:53.000000000 +0200 +++ files/patch-doc_README.opengl 2011-04-21 01:37:13.000000000 +0200 @@ -0,0 +1,12 @@ +--- doc/README.opengl.orig 2000-05-15 22:46:24.000000000 +0200 ++++ doc/README.opengl 2011-04-21 01:36:33.000000000 +0200 +@@ -71,6 +71,9 @@ + 7. -mlook + With this switch you enable free mouse look in the game. Normaly it makes sense to use this switch together with the -grabmouse switch. Mouselook is enabled by default, but it can be switched inside the game. + ++8. -respawnartifacts ++With this switch you enable respawning of artifacts even in version 1.3 as it ++was in version 1.0 of heretic. + + -You can also edit the generated glheretic.cfg file in the $HOME/.heretic + directory after you have started the game once. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104202342.p3KNgp0O086835>