mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-28 01:06:17 +00:00
- Fix undefined references in library (previously it could only be used with
"games/qudos" and "games/kmquake2", because they build a modified version). - Install node files with appropiate permissions. - Add an entry in pkg-message about permissions. - Bump PORTREVISION. Reported by: Volodymyr Kostyrko <arcade@synergetica.dn.ua> Obtained from: http://svn.quakedev.com/viewcvs.cgi/qudos/trunk/src/mods/3zb2/
This commit is contained in:
parent
f06b5fcae0
commit
48901ec1b7
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=181110
@ -7,6 +7,7 @@
|
||||
|
||||
PORTNAME= 3zb2
|
||||
PORTVERSION= 0.97
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= games
|
||||
MASTER_SITES= http://www.angelfire.com/mt2/quakebots/:prog \
|
||||
http://ponpoko.tri6.net/3zb2/routes/:nodes
|
||||
@ -59,8 +60,12 @@ post-extract:
|
||||
do-install:
|
||||
${MKDIR} ${Q2DIR}/${PORTNAME}
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/game.so ${Q2DIR}/${PORTNAME}
|
||||
cd ${WRKSRC}/3zb2 && ${CP} -R *.cfg 3ZBMaps.lst chctf chdtm pak6.pak \
|
||||
${Q2DIR}/${PORTNAME}
|
||||
cd ${WRKSRC}/3zb2 && \
|
||||
${INSTALL_DATA} *.cfg 3ZBMaps.lst pak6.pak ${Q2DIR}/${PORTNAME}
|
||||
.for f in chctf chdtm
|
||||
${MKDIR} ${Q2DIR}/${PORTNAME}/${f}
|
||||
${INSTALL_DATA} ${WRKSRC}/3zb2/${f}/* ${Q2DIR}/${PORTNAME}/${f}
|
||||
.endfor
|
||||
.if defined(WITH_NODES)
|
||||
${INSTALL_DATA} ${WRKSRC}/*.chn ${Q2DIR}/${PORTNAME}/chdtm
|
||||
${INSTALL_DATA} ${WRKSRC}/*.chf ${Q2DIR}/${PORTNAME}/chctf
|
||||
|
230
games/quake2-3zb2/files/patch-bot.c
Normal file
230
games/quake2-3zb2/files/patch-bot.c
Normal file
@ -0,0 +1,230 @@
|
||||
--- ./bot.c.orig Sat Dec 30 19:09:03 2006
|
||||
+++ ./bot.c Sat Dec 30 19:09:23 2006
|
||||
@@ -297,3 +297,227 @@
|
||||
return vecsyaw;
|
||||
}
|
||||
|
||||
+//========================================================
|
||||
+//============= BOT TALKING/TAUNTING ROUTINES ============
|
||||
+//========================================================
|
||||
+//=====================================================
|
||||
+// Returns Player with Highest Score.
|
||||
+//=====================================================
|
||||
+
|
||||
+edict_t *BestScoreEnt(void) {
|
||||
+
|
||||
+ edict_t *bestplayer=NULL;
|
||||
+ int i, bestscore=-999;
|
||||
+ edict_t *ent;
|
||||
+
|
||||
+ // Search thru all clients
|
||||
+ for(i=0;i < game.maxclients; i++) {
|
||||
+ ent=g_edicts+i+1;
|
||||
+// if (!G_EntExists(ent)) continue;
|
||||
+ if (ent->client->resp.score > bestscore) {
|
||||
+ bestplayer=ent; // Found one!
|
||||
+ bestscore=ent->client->resp.score;
|
||||
+ }
|
||||
+ }
|
||||
+ return bestplayer;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+
|
||||
+//=======================================================
|
||||
+// Taunt your victim! Called from ClientObituary()..
|
||||
+//=======================================================
|
||||
+void bTaunt(edict_t *bot, edict_t *other) {
|
||||
+
|
||||
+ if ((rand()%5) >= 2)
|
||||
+ return;
|
||||
+
|
||||
+ if (level.time < bot->last_taunt)
|
||||
+ return;
|
||||
+
|
||||
+ // If killed enemy then Taunt them!!
|
||||
+ if ((other->client) && (random() < 0.4))
|
||||
+ switch (rand()%4) {
|
||||
+ case 0: // flipoff
|
||||
+ bot->s.frame = FRAME_flip01-1;
|
||||
+ bot->client->anim_end = FRAME_flip12;
|
||||
+ break;
|
||||
+ case 1: // salute
|
||||
+ bot->s.frame = FRAME_salute01-1;
|
||||
+ bot->client->anim_end = FRAME_salute11;
|
||||
+ break;
|
||||
+ case 2: // taunt
|
||||
+ bot->s.frame = FRAME_taunt01-1;
|
||||
+ bot->client->anim_end = FRAME_taunt17;
|
||||
+ break;
|
||||
+ case 3: // point
|
||||
+ bot->s.frame = FRAME_point01-1;
|
||||
+ bot->client->anim_end = FRAME_point12;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+// Taunt victim but not too often..
|
||||
+ bot->last_taunt = level.time + 60 + 35;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+//========================================================
|
||||
+void bFakeChat(edict_t *bot) {
|
||||
+
|
||||
+ gclient_t *bclient=bot->client;
|
||||
+
|
||||
+ if (random() < .1)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Bunch of Chicken Shits!\n", bclient->pers.netname);
|
||||
+ else if (random() < .2)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Tu madre!!!\n", bclient->pers.netname);
|
||||
+ else if (random() < .3)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Who wants a piece of me?\n", bclient->pers.netname);
|
||||
+ else if (random() < .4)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Where'd everybody go?\n", bclient->pers.netname);
|
||||
+ else if (random() < .5)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Yeee pendejos venid por mi! pateare vuestro gordo culo\n", bclient->pers.netname);
|
||||
+ else
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Kickin' Ass!\n", bclient->pers.netname);
|
||||
+
|
||||
+// Random chats between 2 minutes and 10 minutes
|
||||
+ bot->last_chat = level.time + 120 + (60*(rand()%8));
|
||||
+}
|
||||
+
|
||||
+
|
||||
+
|
||||
+
|
||||
+
|
||||
+//========================================================
|
||||
+// Insult the player that the bot just fragged...
|
||||
+//========================================================
|
||||
+void bInsult(edict_t *bot, edict_t *loser) {
|
||||
+
|
||||
+ gclient_t *bclient=bot->client;
|
||||
+ gclient_t *lclient=loser->client;
|
||||
+
|
||||
+ if ((rand()%5) > 3)
|
||||
+ return;
|
||||
+
|
||||
+ if (level.time < bot->last_insult)
|
||||
+ return;
|
||||
+
|
||||
+ if (bclient->resp.score < lclient->resp.score) {
|
||||
+
|
||||
+ if (bclient->resp.score < lclient->resp.score - 20) {
|
||||
+ if (random() < .1)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Heh... I'm all luck, %s\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .2)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: WHEW! Finally got ya, %s!\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .3)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: I...I killed %s? I...don't remember... it all happened so fast!\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .4)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Only pussies on this server!\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .5)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Sure, I'm losing by a ton, but does that mean I suck? Probably.\n", bclient->pers.netname);
|
||||
+ else
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Not bad for a beginner, eh %s?\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ }
|
||||
+ else if (bclient->resp.score < lclient->resp.score - 10) {
|
||||
+
|
||||
+ if (random() < .1)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Well, %s, what can I say? You're good... but not good enough\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .2)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: I'll get you %s, and your little dog, too\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .3)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Oh, I get how you play now, %s... you're mine.\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .4)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: What's that, %s? Do I smell smoke?\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .5)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Oops! Sorry %s, You REALLY suck!\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: YEAH BABY, YEAH!\n", bclient->pers.netname);
|
||||
+ }
|
||||
+ else if (bclient->resp.score < lclient->resp.score - 5) {
|
||||
+ if (random() < .1)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Ok, %s, I'm back on track now\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .2)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: You aren't gonna win THAT easy, %s.\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .3)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Umm, ok %s, I'd appreciate it if you could not bleed on my clothes next time.\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .4)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: You might wanna get that fixed, %s\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .5)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Uh oh... BRB, I have to clean this %s off my shirt before it sets in.\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: hiiiiiihaaaaaa\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ }
|
||||
+ else {
|
||||
+ if (random() < .1)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: I can still catch up with you, %s, don't get cocky\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .2)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: You're alllll mine, %s.\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .3)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Come on, %s, just you and me.\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .4)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: The best part of wakin' uuup is %s gibs in your cuuup!\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .5)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Oh my, %s, that didn't look like it felt very nice.\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Well, %s, looks like things might even up.\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ }
|
||||
+ }
|
||||
+ else if (bclient->resp.score > lclient->resp.score) {
|
||||
+ if (bclient->resp.score > lclient->resp.score + 10) {
|
||||
+ if (random() < .1)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: You're never going to catch up to me, %s. Just give up.\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .2)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Hey %s, have you tried reading one of those ""DeathMatch for Dummies"" books? HeeeeHaaaaa\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .3)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Oh %s, you make me feel so... alive!\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .4)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Me? Using a bot? No way %s, I'm all skill!\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .5)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Hey %s, are you letting your mom play again?\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: You do know there's an autorun option, don't you?\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ }
|
||||
+ else if (bclient->resp.score > lclient->resp.score + 5) {
|
||||
+ if (random() < .1)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: HeeeeHaaaaa\n", bclient->pers.netname);
|
||||
+ else if (random() < .2)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Don't feel bad %s, you just aren't gifted like me\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .3)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Come on %s, don't give up now!\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .4)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: I think you just need to practice more, %s. muhhhhaahhhaaa\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .5)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: I just want you to know that I think you're taking this beating very well, %s\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Is that freshly cooked whupass I smell, %s?\n", bclient->pers.netname, lclient->pers.netname); }
|
||||
+ else {
|
||||
+ if (random() < .1)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Come on, %s, ajajajaaaaaaja I can take you\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .2)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: You're goin' down, %s.\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .3)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Oh, so %s, you want some?\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .4)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: That's right %s, you know who yo daddy is\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .5)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Better get that taken care of, %s. It could get infected.\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Don't ya just love it?\n", bclient->pers.netname, lclient->pers.netname); }
|
||||
+ }
|
||||
+ else {
|
||||
+ if (random() < .1)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Oh look, a tie! Well %s, we'll just have to fix that!\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .2)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Time to pay your pimp, %s\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .3)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Come on %s, it's time to ride daddy's rocket\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .4)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Look %s, we're tied... want me to fix that? Ok then!\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else if (random() < .5)
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Damn %s, I thought you were better than this\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ else
|
||||
+ gi.bprintf(PRINT_CHAT, "%s: Alright, %s, I'm not showing any mercy this time.\n", bclient->pers.netname, lclient->pers.netname);
|
||||
+ }
|
||||
+
|
||||
+// Next insult between 30 sec and 5 minutes
|
||||
+ bot->last_insult = level.time + 30 + (60*(rand()%5));
|
||||
+}
|
21
games/quake2-3zb2/files/patch-bot_func.c
Normal file
21
games/quake2-3zb2/files/patch-bot_func.c
Normal file
@ -0,0 +1,21 @@
|
||||
--- ./bot_func.c.orig Sat Dec 30 19:09:03 2006
|
||||
+++ ./bot_func.c Sat Dec 30 19:09:23 2006
|
||||
@@ -84,8 +84,8 @@
|
||||
botlist = gi.cvar ("botlist", "default", CVAR_SERVERINFO | CVAR_LATCH);
|
||||
gamepath = gi.cvar ("game", "0", CVAR_NOSET);
|
||||
|
||||
- //load info
|
||||
- sprintf(Buff,".\\%s\\3ZBconfig.cfg",gamepath->string);
|
||||
+ //load info
|
||||
+ sprintf(Buff,"%s/3ZBConfig.cfg",gamepath->string);
|
||||
fp = fopen(Buff,"rt");
|
||||
if(fp == NULL)
|
||||
{
|
||||
@@ -336,7 +336,6 @@
|
||||
gclient_t *client;
|
||||
char pinfo[200];
|
||||
int index;
|
||||
- int i;
|
||||
|
||||
index = ent-g_edicts-1;
|
||||
ent->client = &game.clients[index];
|
72
games/quake2-3zb2/files/patch-g_ctf.c
Normal file
72
games/quake2-3zb2/files/patch-g_ctf.c
Normal file
@ -0,0 +1,72 @@
|
||||
--- ./g_ctf.c.orig Sat Dec 30 19:09:03 2006
|
||||
+++ ./g_ctf.c Sat Dec 30 19:09:23 2006
|
||||
@@ -378,12 +378,12 @@
|
||||
float range, range1, range2;
|
||||
char *cname;
|
||||
|
||||
- if (ent->client->resp.ctf_state != CTF_STATE_START)
|
||||
+ if (ent->client->resp.ctf_state != CTF_STATE_START) {
|
||||
if ( (int)(dmflags->value) & DF_SPAWN_FARTHEST)
|
||||
return SelectFarthestDeathmatchSpawnPoint ();
|
||||
else
|
||||
return SelectRandomDeathmatchSpawnPoint ();
|
||||
-
|
||||
+ }
|
||||
ent->client->resp.ctf_state = CTF_STATE_PLAYING;
|
||||
|
||||
switch (ent->client->resp.ctf_team) {
|
||||
@@ -806,7 +806,7 @@
|
||||
dropped->touch = CTFDropFlagTouch;
|
||||
}
|
||||
}
|
||||
-
|
||||
+#if 0
|
||||
qboolean CTFDrop_Flag(edict_t *ent, gitem_t *item)
|
||||
{
|
||||
if (rand() & 1)
|
||||
@@ -821,7 +821,21 @@
|
||||
}
|
||||
return false;
|
||||
}
|
||||
-
|
||||
+#else
|
||||
+void CTFDrop_Flag(edict_t *ent, gitem_t *item)
|
||||
+{
|
||||
+ if (rand() & 1)
|
||||
+ {
|
||||
+ if(!(ent->svflags & SVF_MONSTER))
|
||||
+ gi.cprintf(ent, PRINT_HIGH, "Only lusers drop flags.\n");
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if(!(ent->svflags & SVF_MONSTER))
|
||||
+ gi.cprintf(ent, PRINT_HIGH, "Winners don't drop flags.\n");
|
||||
+ }
|
||||
+}
|
||||
+#endif
|
||||
static void CTFFlagThink(edict_t *ent)
|
||||
{
|
||||
if (ent->solid != SOLID_NOT)
|
||||
@@ -3004,10 +3018,11 @@
|
||||
CurrentIndex = 0;
|
||||
memset(Route,0,sizeof(Route));
|
||||
memset(code,0,8);
|
||||
-
|
||||
- if(!ctf->value) sprintf(name,".\\%s\\chdtm\\%s.chn",gamepath->string,level.mapname);
|
||||
- else sprintf(name,".\\%s\\chctf\\%s.chf",gamepath->string,level.mapname);
|
||||
-
|
||||
+ if(!ctf->value)
|
||||
+ sprintf(name,"%s/chdtm/%s.chn",gamepath->string,level.mapname);
|
||||
+ else
|
||||
+ sprintf(name,"%s/chctf/%s.chf",gamepath->string,level.mapname);
|
||||
+
|
||||
fpout = fopen(name,"rb");
|
||||
if(fpout == NULL)
|
||||
{
|
||||
@@ -3224,4 +3239,4 @@
|
||||
if(geti2 != NULL) geti2->client->zc.ctfstate = CTFS_OFFENCER;
|
||||
}
|
||||
/// gi.bprintf(PRINT_HIGH,"Called!!!!\n");
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
18
games/quake2-3zb2/files/patch-g_ctf.h
Normal file
18
games/quake2-3zb2/files/patch-g_ctf.h
Normal file
@ -0,0 +1,18 @@
|
||||
--- ./g_ctf.h.orig Sat Dec 30 19:09:03 2006
|
||||
+++ ./g_ctf.h Sat Dec 30 19:09:23 2006
|
||||
@@ -82,7 +82,7 @@
|
||||
void CTFAssignTeam(gclient_t *who);
|
||||
edict_t *SelectCTFSpawnPoint (edict_t *ent);
|
||||
qboolean CTFPickup_Flag(edict_t *ent, edict_t *other);
|
||||
-qboolean CTFDrop_Flag(edict_t *ent, gitem_t *item);
|
||||
+void CTFDrop_Flag(edict_t *ent, gitem_t *item); //was qboolean
|
||||
void CTFEffects(edict_t *player);
|
||||
void CTFCalcScores(void);
|
||||
void SetCTFStats(edict_t *ent);
|
||||
@@ -133,4 +133,4 @@
|
||||
|
||||
void SP_trigger_teleport (edict_t *ent);
|
||||
void SP_info_teleport_destination (edict_t *ent);
|
||||
-#endif
|
||||
\ No newline at end of file
|
||||
+#endif
|
15
games/quake2-3zb2/files/patch-g_items.c
Normal file
15
games/quake2-3zb2/files/patch-g_items.c
Normal file
@ -0,0 +1,15 @@
|
||||
--- ./g_items.c.orig Sat Dec 30 19:09:03 2006
|
||||
+++ ./g_items.c Sat Dec 30 19:09:23 2006
|
||||
@@ -28,9 +28,9 @@
|
||||
gitem_armor_t combatarmor_info = { 50, 100, .60, .30, ARMOR_COMBAT};
|
||||
gitem_armor_t bodyarmor_info = {100, 200, .80, .60, ARMOR_BODY};
|
||||
|
||||
-static int jacket_armor_index;
|
||||
-static int combat_armor_index;
|
||||
-static int body_armor_index;
|
||||
+int jacket_armor_index;
|
||||
+int combat_armor_index;
|
||||
+int body_armor_index;
|
||||
static int power_screen_index;
|
||||
static int power_shield_index;
|
||||
|
48
games/quake2-3zb2/files/patch-g_local.h
Normal file
48
games/quake2-3zb2/files/patch-g_local.h
Normal file
@ -0,0 +1,48 @@
|
||||
--- ./g_local.h.orig Sat Dec 30 19:09:03 2006
|
||||
+++ ./g_local.h Sat Dec 30 19:09:23 2006
|
||||
@@ -586,10 +586,10 @@
|
||||
extern cvar_t *zigmode;
|
||||
extern float spawncycle;
|
||||
//ponpoko
|
||||
-
|
||||
//ZOID
|
||||
extern qboolean is_quad;
|
||||
//ZOID
|
||||
+extern cvar_t *botchat;
|
||||
|
||||
#define world (&g_edicts[0])
|
||||
|
||||
@@ -636,6 +636,13 @@
|
||||
extern field_t fields[];
|
||||
extern gitem_t itemlist[];
|
||||
|
||||
+//
|
||||
+// bot.c
|
||||
+//
|
||||
+
|
||||
+void bFakeChat(edict_t *bot);
|
||||
+void bInsult(edict_t *bot, edict_t *loser);
|
||||
+void bTaunt(edict_t *bot, edict_t *other);
|
||||
|
||||
//
|
||||
// g_cmds.c
|
||||
@@ -1246,12 +1253,16 @@
|
||||
// common data blocks
|
||||
moveinfo_t moveinfo;
|
||||
monsterinfo_t monsterinfo;
|
||||
-
|
||||
+
|
||||
// RAFAEL
|
||||
int orders;
|
||||
+
|
||||
+ float last_insult;
|
||||
+ float last_taunt;
|
||||
+ float last_chat;
|
||||
};
|
||||
|
||||
//ZOID
|
||||
#include "g_ctf.h"
|
||||
//ZOID
|
||||
-#endif
|
||||
\ No newline at end of file
|
||||
+#endif
|
20
games/quake2-3zb2/files/patch-g_main.c
Normal file
20
games/quake2-3zb2/files/patch-g_main.c
Normal file
@ -0,0 +1,20 @@
|
||||
--- ./g_main.c.orig Sat Dec 30 19:09:03 2006
|
||||
+++ ./g_main.c Sat Dec 30 19:09:23 2006
|
||||
@@ -62,6 +62,7 @@
|
||||
float spawncycle;
|
||||
float ctfjob_update;
|
||||
//ponpoko
|
||||
+cvar_t *botchat;
|
||||
|
||||
void SpawnEntities (char *mapname, char *entities, char *spawnpoint);
|
||||
void ClientThink (edict_t *ent, usercmd_t *cmd);
|
||||
@@ -209,7 +210,8 @@
|
||||
|
||||
if(!maplist->string) return;
|
||||
|
||||
- sprintf(Buff,".\\%s\\3ZBMAPS.LST",gamepath->string);
|
||||
+ sprintf(Buff,"%s/3ZBMaps.lst",gamepath->string);
|
||||
+
|
||||
fp = fopen(Buff,"r");
|
||||
if(fp == NULL) return;
|
||||
|
22
games/quake2-3zb2/files/patch-g_save.c
Normal file
22
games/quake2-3zb2/files/patch-g_save.c
Normal file
@ -0,0 +1,22 @@
|
||||
--- ./g_save.c.orig Sat Dec 30 19:09:03 2006
|
||||
+++ ./g_save.c Sat Dec 30 19:09:23 2006
|
||||
@@ -202,7 +202,9 @@
|
||||
bob_up = gi.cvar ("bob_up", "0.005", 0);
|
||||
bob_pitch = gi.cvar ("bob_pitch", "0.002", 0);
|
||||
bob_roll = gi.cvar ("bob_roll", "0.002", 0);
|
||||
-
|
||||
+
|
||||
+ botchat = gi.cvar ("botchat", "1", CVAR_ARCHIVE);
|
||||
+
|
||||
// items
|
||||
InitItems ();
|
||||
|
||||
@@ -295,6 +297,8 @@
|
||||
len = strlen(*(char **)p) + 1;
|
||||
fwrite (*(char **)p, len, 1, f);
|
||||
}
|
||||
+ break;
|
||||
+ default:
|
||||
break;
|
||||
}
|
||||
}
|
13
games/quake2-3zb2/files/patch-g_svcmds.c
Normal file
13
games/quake2-3zb2/files/patch-g_svcmds.c
Normal file
@ -0,0 +1,13 @@
|
||||
--- ./g_svcmds.c.orig Sat Dec 30 19:09:03 2006
|
||||
+++ ./g_svcmds.c Sat Dec 30 19:09:23 2006
|
||||
@@ -310,8 +310,8 @@
|
||||
}
|
||||
|
||||
//‚Æ‚è‚ ‚¦‚¸CTF‚¾‚ß
|
||||
- if(ctf->value) sprintf(name,".\\%s\\chctf\\%s.chf",gamepath->string,level.mapname);
|
||||
- else sprintf(name,".\\%s\\chdtm\\%s.chn",gamepath->string,level.mapname);
|
||||
+ if(ctf->value) sprintf(name,"%s/chctf/%s.chf",gamepath->string,level.mapname);
|
||||
+ else sprintf(name,"%s/chdtm/%s.chn",gamepath->string,level.mapname);
|
||||
|
||||
fpout = fopen(name,"wb");
|
||||
if(fpout == NULL) gi.cprintf(NULL,PRINT_HIGH,"Can't open %s\n",name);
|
65
games/quake2-3zb2/files/patch-g_turret.c
Normal file
65
games/quake2-3zb2/files/patch-g_turret.c
Normal file
@ -0,0 +1,65 @@
|
||||
--- ./g_turret.c.orig Sat Dec 30 19:09:03 2006
|
||||
+++ ./g_turret.c Sat Dec 30 19:09:23 2006
|
||||
@@ -253,8 +253,11 @@
|
||||
*/
|
||||
|
||||
void infantry_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage);
|
||||
+/*
|
||||
void infantry_stand (edict_t *self);
|
||||
-void monster_use (edict_t *self, edict_t *other, edict_t *activator);
|
||||
+void monster_use (edict_t *self, edict_t *other, edict_t *activator);
|
||||
+*/
|
||||
+
|
||||
|
||||
void turret_driver_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point)
|
||||
{
|
||||
@@ -273,10 +276,13 @@
|
||||
self->target_ent->owner = NULL;
|
||||
self->target_ent->teammaster->owner = NULL;
|
||||
|
||||
- infantry_die (self, inflictor, attacker, damage);
|
||||
+// infantry_die (self, inflictor, attacker, damage);
|
||||
+
|
||||
}
|
||||
|
||||
-qboolean FindTarget (edict_t *self);
|
||||
+
|
||||
+//qboolean FindTarget (edict_t *self);
|
||||
+
|
||||
|
||||
void turret_driver_think (edict_t *self)
|
||||
{
|
||||
@@ -291,8 +297,11 @@
|
||||
|
||||
if (!self->enemy)
|
||||
{
|
||||
+ /*
|
||||
if (!FindTarget (self))
|
||||
- return;
|
||||
+ return;
|
||||
+ */
|
||||
+
|
||||
self->monsterinfo.trail_time = level.time;
|
||||
self->monsterinfo.aiflags &= ~AI_LOST_SIGHT;
|
||||
}
|
||||
@@ -385,7 +394,8 @@
|
||||
self->viewheight = 24;
|
||||
|
||||
self->die = turret_driver_die;
|
||||
- self->monsterinfo.stand = infantry_stand;
|
||||
+
|
||||
+// self->monsterinfo.stand = infantry_stand;
|
||||
|
||||
self->flags |= FL_NO_KNOCKBACK;
|
||||
|
||||
@@ -394,7 +404,9 @@
|
||||
self->svflags |= SVF_MONSTER;
|
||||
self->s.renderfx |= RF_FRAMELERP;
|
||||
self->takedamage = DAMAGE_AIM;
|
||||
- self->use = monster_use;
|
||||
+
|
||||
+// self->use = monster_use;
|
||||
+
|
||||
self->clipmask = MASK_MONSTERSOLID;
|
||||
VectorCopy (self->s.origin, self->s.old_origin);
|
||||
self->monsterinfo.aiflags |= AI_STAND_GROUND|AI_DUCKED;
|
27
games/quake2-3zb2/files/patch-p_client.c
Normal file
27
games/quake2-3zb2/files/patch-p_client.c
Normal file
@ -0,0 +1,27 @@
|
||||
--- ./p_client.c.orig Sat Dec 30 19:09:03 2006
|
||||
+++ ./p_client.c Sat Dec 30 19:09:23 2006
|
||||
@@ -388,6 +388,12 @@
|
||||
gi.bprintf (PRINT_MEDIUM,"%s %s %s%s\n", self->client->pers.netname, message, attacker->client->pers.netname, message2);
|
||||
if (deathmatch->value)
|
||||
{
|
||||
+ if (botchat->value) {
|
||||
+ if (attacker->client && attacker != self) {
|
||||
+ bTaunt(attacker, self);
|
||||
+ bInsult(attacker, self);
|
||||
+ }
|
||||
+ }
|
||||
if (ff)
|
||||
attacker->client->resp.score--;
|
||||
else
|
||||
@@ -1342,7 +1348,10 @@
|
||||
VectorCopy (spawn_origin, ent->s.origin);
|
||||
ent->s.origin[2] += 1; // make sure off ground
|
||||
VectorCopy (ent->s.origin, ent->s.old_origin);
|
||||
-
|
||||
+ ent->last_insult = level.time;
|
||||
+ ent->last_taunt = level.time;
|
||||
+ ent->last_chat = level.time;
|
||||
+
|
||||
// set the delta angle
|
||||
for (i=0 ; i<3 ; i++)
|
||||
client->ps.pmove.delta_angles[i] = ANGLE2SHORT(spawn_angles[i] - client->resp.cmd_angles[i]);
|
20
games/quake2-3zb2/files/patch-p_weapon.c
Normal file
20
games/quake2-3zb2/files/patch-p_weapon.c
Normal file
@ -0,0 +1,20 @@
|
||||
--- ./p_weapon.c.orig Sat Dec 30 19:09:03 2006
|
||||
+++ ./p_weapon.c Sat Dec 30 19:09:23 2006
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "m_player.h"
|
||||
#include "bot.h"
|
||||
|
||||
-static qboolean is_quad;
|
||||
+qboolean is_quad;
|
||||
// RAFAEL
|
||||
static qboolean is_quadfire;
|
||||
static byte is_silenced;
|
||||
@@ -2140,7 +2140,7 @@
|
||||
vec3_t forward, right, up;
|
||||
vec3_t offset;
|
||||
vec3_t v;
|
||||
- int kick = 12;
|
||||
+// int kick = 12;
|
||||
int damage;
|
||||
float damage_radius;
|
||||
int radius_damage;
|
17
games/quake2-3zb2/files/patch-q_shared.c
Normal file
17
games/quake2-3zb2/files/patch-q_shared.c
Normal file
@ -0,0 +1,17 @@
|
||||
--- ./q_shared.c.orig Sat Dec 30 19:09:03 2006
|
||||
+++ ./q_shared.c Sat Dec 30 19:09:23 2006
|
||||
@@ -326,12 +326,12 @@
|
||||
Returns 1, 2, or 1 + 2
|
||||
==================
|
||||
*/
|
||||
-#if !id386
|
||||
+#if !id386 || defined __unix__ || defined __sun__
|
||||
int BoxOnPlaneSide (vec3_t emins, vec3_t emaxs, struct cplane_s *p)
|
||||
{
|
||||
float dist1, dist2;
|
||||
int sides;
|
||||
-
|
||||
+
|
||||
// fast axial cases
|
||||
if (p->type < 3)
|
||||
{
|
32
games/quake2-3zb2/files/patch-q_shared.h
Normal file
32
games/quake2-3zb2/files/patch-q_shared.h
Normal file
@ -0,0 +1,32 @@
|
||||
--- ./q_shared.h.orig Sat Dec 30 19:09:03 2006
|
||||
+++ ./q_shared.h Sat Dec 30 19:09:23 2006
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
-#if defined _M_IX86 && !defined C_ONLY
|
||||
+#if (defined _M_IX86 || defined __i386__) && !defined C_ONLY && !defined __sun__
|
||||
#define id386 1
|
||||
#else
|
||||
#define id386 0
|
||||
@@ -128,7 +128,7 @@
|
||||
// microsoft's fabs seems to be ungodly slow...
|
||||
//float Q_fabs (float f);
|
||||
//#define fabs(f) Q_fabs(f)
|
||||
-#if !defined C_ONLY
|
||||
+#if !defined C_ONLY && !defined __unix__ && !defined __sgi
|
||||
extern long Q_ftol( float f );
|
||||
#else
|
||||
#define Q_ftol( f ) ( long ) (f)
|
||||
@@ -1155,5 +1155,11 @@
|
||||
extern int vidref_val;
|
||||
// PGM
|
||||
// ==================
|
||||
+
|
||||
+#ifdef __unix__
|
||||
+#define stricmp strcasecmp
|
||||
+#define _stricmp strcasecmp
|
||||
+#define _strnicmp strncasecmp
|
||||
+#endif
|
||||
|
||||
#endif
|
@ -11,6 +11,7 @@ you want to run it from (you could use ~/.quake2 for example):
|
||||
$ mkdir -p ~/.quake2/3zb2
|
||||
$ cd %%Q2DIR%%/3zb2
|
||||
$ cp -r 3ZBConfig.cfg 3ZBMaps.lst chctf chdtm ~/.quake2/3zb2
|
||||
$ chmod -r u+w ~/.quake2/3zb2
|
||||
|
||||
Then run it from the recently created directory.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user