Commit graph

275 commits

Author SHA1 Message Date
sago007
68ca108efc Switch to modern values for the LCG.
Values from https://en.wikipedia.org/wiki/Linear_congruential_generator

The old choice was not good enough when only picking between two values.
2018-12-05 23:10:55 +01:00
Poul Sander
c690722e19 Add ui_randomStringToCvar
Also fixed rand() by making randSeed unsigned! rand() would break if called enough.
2018-12-05 19:22:53 +01:00
Poul Sander
289b1b5bba Add ui_randomIntToCvar to the missionpack UI. Generates a random int between minInt and maxInt and stores the result in a CVAR 2018-12-05 18:50:38 +01:00
sago007
95e2023567 Fix potential overflow 2018-12-04 00:53:07 +01:00
sago007
f4a311922c Remove more NO_RESTART from CVARs 2018-12-03 23:30:26 +01:00
sago007
71078f7b83 Added g_harvesterFromBodies as suggested on Pull Request #33
This cvar allows Harvester to work in a similar way to Unreal Tournament 3's Greed mode: it eliminates the neutral obelisk and makes the skulls appear from the fallen players' bodies instead.

This version will move skulls to the neutral obelisk if they enter a nodrop zone.
2018-12-03 22:55:23 +01:00
sago007
cbaf971179 Grapple support: g_grapple. #34
Also removed elimination_grapple

Squashed commit of the following:

commit 76d7a3bd8909c4d3928668f7f5b39c7cdbfe4107
Author: sago007 <poul@poulsander.com>
Date:   Sun Dec 2 11:55:14 2018 +0100

    Removed elimination_grapple. Optimized several lines away

commit ca3d9683c676004247ee5d08102e249354dc3d18
Merge: d781b2e 372a8e6
Author: sago007 <poul@poulsander.com>
Date:   Sun Dec 2 11:42:22 2018 +0100

    Merge branch 'grapple' of git://github.com/NeonKnightOA/gamecode into NeonKnightOA-grapple

commit 372a8e6b19
Author: Neon_Knight <openarena.arg@gmail.com>
Date:   Sat Dec 1 21:33:10 2018 -0300

    Removed grappleAll mode and CVAR_RESTART and CVAR_LATCH from the gametype flags.

commit 3d565c6774
Merge: e0f7240 ec18065
Author: Neon_Knight <openarena.arg@gmail.com>
Date:   Sat Dec 1 20:37:15 2018 -0300

    Merge branch 'grapple' of https://github.com/NeonKnightOA/gamecode into grapple

commit e0f7240797
Merge: 5e5c55a b40d886
Author: NeonKnightOA <openarena.arg@gmail.com>
Date:   Sat Dec 1 20:35:43 2018 -0300

    Merge pull request #3 from OpenArena/master

    Updating the code.

commit ec18065fdb
Merge: 2c7d0c3 b40d886
Author: NeonKnightOA <openarena.arg@gmail.com>
Date:   Sat Dec 1 20:30:40 2018 -0300

    Merge branch 'master' into grapple

commit 5e5c55a7f0
Merge: 468dd68 d967ac8
Author: NeonKnightOA <openarena.arg@gmail.com>
Date:   Sat Dec 1 16:24:06 2018 -0300

    Merge pull request #2 from OpenArena/master

    Replace GAMETYPE checks with defines

commit 2c7d0c3af6
Merge: f716785 d967ac8
Author: NeonKnightOA <openarena.arg@gmail.com>
Date:   Sat Dec 1 12:45:05 2018 -0300

    Merge branch 'master' into grapple

commit 468dd68a22
Merge: b9a61db 0bee41a
Author: NeonKnightOA <openarena.arg@gmail.com>
Date:   Sat Dec 1 11:02:24 2018 -0300

    Merge pull request #1 from OpenArena/master

    Pull request #35. Replaces all the complicated gametype checks with h…

commit f7167854cf
Merge: 79d3f31 576e947
Author: Neon_Knight <openarena.arg@gmail.com>
Date:   Sat Dec 1 10:32:35 2018 -0300

    Merge branch 'grapple' of https://github.com/NeonKnightOA/gamecode into grapple

commit 79d3f31705
Author: Neon_Knight <openarena.arg@gmail.com>
Date:   Sat Dec 1 10:31:52 2018 -0300

    Fixed.

commit 576e947dc0
Merge: 0d1031f 0bee41a
Author: NeonKnightOA <openarena.arg@gmail.com>
Date:   Sat Dec 1 10:27:31 2018 -0300

    Merge branch 'master' into grapple

commit 0d1031fe2d
Author: Neon_Knight <openarena.arg@gmail.com>
Date:   Sat Dec 1 10:24:36 2018 -0300

    Updated with the new gamecode.

commit b9a61dbe45
Author: Neon_Knight <openarena.arg@gmail.com>
Date:   Wed Nov 28 21:26:34 2018 -0300

    Revert "Toggleable missionpack checks. Disables team models and relevant checks interfering with testing. Some comments were also modified in order to work with SciTE."

    This reverts commit fe4c340e35.

commit fe4c340e35
Author: Neon_Knight <openarena.arg@gmail.com>
Date:   Wed Nov 28 21:21:31 2018 -0300

    Toggleable missionpack checks. Disables team models and relevant checks interfering with testing. Some comments were also modified in order to work with SciTE.
2018-12-02 11:58:15 +01:00
sago007
d781b2e540 Remove a lot of CVAR_NORESTART 2018-12-02 00:20:01 +01:00
sago007
b40d886115 Make it easier to rationate about the code 2018-12-01 22:45:17 +01:00
sago007
1048e68b91 Announce changes to pmove_* values. Not that they should be changed during gameplay but still. 2018-12-01 22:31:10 +01:00
sago007
d967ac858b Replace GAMETYPE checks with defines
Still uses wrappers in the code.

Also changed the proxy objective to be simpler and save a check
2018-12-01 14:14:56 +01:00
sago007
0bee41a517 Pull request #35. Replaces all the complicated gametype checks with helper functions
Squashed commit of the following:

commit c05ffecf38
Author: Neon_Knight <openarena.arg@gmail.com>
Date:   Fri Nov 30 22:53:54 2018 -0300

    This is also not needed anymore.

commit 14abe7715a
Author: Neon_Knight <openarena.arg@gmail.com>
Date:   Fri Nov 30 22:29:26 2018 -0300

    Last checks found. Hopefully that's enough.

commit cad2ab0c5a
Author: Neon_Knight <openarena.arg@gmail.com>
Date:   Fri Nov 30 22:14:33 2018 -0300

    We don't need g_ffa_gt anymore.

commit 2577547db4
Author: Neon_Knight <openarena.arg@gmail.com>
Date:   Fri Nov 30 22:04:09 2018 -0300

    More checks located.

commit d9c96477c6
Author: Neon_Knight <openarena.arg@gmail.com>
Date:   Fri Nov 30 21:29:41 2018 -0300

    Had to do this just to get it to compile.

commit 2089039745
Author: Neon_Knight <openarena.arg@gmail.com>
Date:   Fri Nov 30 21:18:25 2018 -0300

    Fixing several syntax errors.

commit 0edba34607
Author: Neon_Knight <openarena.arg@gmail.com>
Date:   Fri Nov 30 21:07:23 2018 -0300

    Oops... my mistakes. -.-

commit 05e9ef79d4
Author: Neon_Knight <openarena.arg@gmail.com>
Date:   Fri Nov 30 21:00:00 2018 -0300

    New checks for team flags, team obelisks, control points and rounds.

commit 06e325ab00
Author: Neon_Knight <openarena.arg@gmail.com>
Date:   Thu Nov 29 17:10:48 2018 -0300

    Some syntax errors fixed.

commit e394d4fc54
Author: Neon_Knight <openarena.arg@gmail.com>
Date:   Thu Nov 29 17:00:01 2018 -0300

    Finished the splitting.

commit 5e267d161f
Author: Neon_Knight <openarena.arg@gmail.com>
Date:   Thu Nov 29 16:34:01 2018 -0300

    Splitting the function.

commit 7c643f14aa
Author: Neon_Knight <openarena.arg@gmail.com>
Date:   Thu Nov 29 12:36:14 2018 -0300

    Syntax error.

commit aba598fde4
Author: Neon_Knight <openarena.arg@gmail.com>
Date:   Thu Nov 29 12:26:58 2018 -0300

    All the isTeam checks were moved to a centralized function.

commit b9a61dbe45
Author: Neon_Knight <openarena.arg@gmail.com>
Date:   Wed Nov 28 21:26:34 2018 -0300

    Revert "Toggleable missionpack checks. Disables team models and relevant checks interfering with testing. Some comments were also modified in order to work with SciTE."

    This reverts commit fe4c340e35.

commit fe4c340e35
Author: Neon_Knight <openarena.arg@gmail.com>
Date:   Wed Nov 28 21:21:31 2018 -0300

    Toggleable missionpack checks. Disables team models and relevant checks interfering with testing. Some comments were also modified in order to work with SciTE.
2018-12-01 10:43:03 +01:00
sago007
da74d1ed06 Manual cherry pick from NeonKnight's "Bot check fix." but without the lowgrav cvar covered by g_gravityModifier=.5 2018-11-28 21:57:31 +01:00
Neon_Knight
0ce674e1e3 More aggressive AI for Possession. Now will actively try to track and combat the flag carrier. 2018-11-28 21:54:28 +01:00
Neon_Knight
35433b8bc1 Checks that now account for LMS and Possession. Required for the SP to work well. 2018-11-28 21:51:46 +01:00
sago007
bfe2bbb66c Move check for persistant powerup into Disabled item 2018-11-18 15:31:23 +01:00
sago007
f3aae54e51 Fix wrong tab order plus some cleanup 2018-11-18 13:44:49 +01:00
sago007
02009091ef Rename "g_persistantpowerups" to "g_runes". The variable and the actual command now has the same name. 2018-11-18 12:12:51 +01:00
sago007
4c677a6164 Ensure that base is always set to something non-zero 2018-11-18 10:36:30 +01:00
sago007
574e72fc74 Simplified the spawning procedure by registrering all items. This also makes "map_restart" more reliable 2018-11-18 10:23:19 +01:00
sago007
aaf309de28 Removed shuffle from vote string by default 2018-08-11 12:30:40 +02:00
sago007
f1e36de4af Print what we are voting about in the console 2018-08-11 12:21:06 +02:00
Poul Sander
7de5b36b46 Code clean up 2018-06-20 20:57:23 +02:00
sago007
38762bcda6 More bug fixes 2018-05-05 22:52:06 +02:00
sago007
741df34b5c Fix a lot of bugs. 2018-05-05 22:36:20 +02:00
Dio Eraclea
46e748b711 vmMain(): add Q_EXPORT macro in definitions
Without this, the following error happens when trying to run with
native libraries (.so):

```
Sys_LoadGameDll(/path/to/qagamex86_64.so) failed to find vmMain function:
"/path/to/qagamex86_64.so: undefined symbol: vmMain" !
Failed to load DLL /path/to/qagamex86_64.so.
----- Server Shutdown (Server fatal crashed: VM_Create on game failed) -----
```
2017-08-22 18:40:33 +01:00
Simon McVittie
90a23971c8 Pick up date from SOURCE_DATE_EPOCH, for reproducible builds
The goal of reproducible builds is that a rebuild of the same source
code with the same compiler, libraries, etc. should result in the same
binaries. SOURCE_DATE_EPOCH provides a standard way for build systems
to fill in the date of the latest source change, typically from a git
commit or from metadata like the debian/changelog in Debian packages.

This does not change anything if SOURCE_DATE_EPOCH is not defined;
the intention is that a larger build system like a Debian package
will define it.

Please see https://reproducible-builds.org/ for more information about
reproducible builds.

Originally sent to ioquake3 as commit
9c76b546e3
(which also touched engine files not present here).

Signed-off-by: Simon McVittie <smcv@debian.org>
2017-06-25 00:08:13 +01:00
sago007
1669e8607a Use early return instead of deep nesting in the CheckLMS and CheckElimination functions. 2017-04-22 15:36:14 +02:00
sago007
b8b7b34fd3 If all humans are killed start killing the bots in Last Man Standing 2017-04-22 15:29:43 +02:00
sago007
61808ccb16 Start killing bots in Elimination and CTF Elimination if all humans have been eliminated. 2017-04-22 15:18:07 +02:00
sago007
09ba7ce5a8 Changed the formatting a bit 2017-04-22 14:21:19 +02:00
The-Gig
5527fa33dd Short prox mines fuse feat applied to obelisks in Harvester
Apart from the different entity which identifies the bases (obelisk instead of flag), game mechanics of Harvester and OneFlag are similar in this regard (bring something to enemy base). So if the short mine exploding time (near your own base) is applied to OneFlag, it has got sense to also apply it to Harvester.
2017-01-10 10:34:23 +01:00
The-Gig
d44d7748a2 Updated default g_voteGametypes value, adding "13/" (Possession gametype) 2017-01-10 10:09:26 +01:00
sago007
3a1ca135cf Also updated the worst cases of the header files 2017-01-02 18:43:12 +01:00
sago007
d2f44a96d9 Lots of formatting changes. 2017-01-02 18:33:46 +01:00
sago007
02315f58ea The short prox fuse functionalite no longer Applies to Team Deathmatch, Harvester, Elimination, Domination and Double Domination.
For Obelisk it now goes for the obelisks instead of the flag bases.
2016-12-22 18:06:11 +01:00
sago007
83a1c2cacc Small improvements to the code 2016-12-22 17:41:24 +01:00
sago007
ba479f857f Reduced the effect of g_awardpushing 2 significantly. The only difference now is that it does not check for solid ground 2016-12-18 14:27:35 +01:00
sago007
0e24122851 Changed func_train to work more like func_bob rather than a crusher. 2016-12-11 21:21:54 +01:00
sago007
a111d431a9 Added a Train_Blocked callback function. Also removed support for TRAIN_BLOCK_STOPS. It appeared to be broken beyond repair and completly undocumented.
Trains now always crush. This might seem aggressive but there are no way logical way to turn them around and the only logical spawnflag was already in use.
2016-12-03 15:49:14 +01:00
sago007
86fee58e40 Used the wrong enums. Not sure this makes more sense but not it is easier to read. 2016-12-03 14:34:23 +01:00
sago007
9cf841d5f2 Removed all warnings as reported by gcc 6.2.0. 2016-11-27 13:33:42 +01:00
sago007
cb6f540bfb Added a more aggressive form of g_awardpushing. Set it to 2 and we no longer forget you. Also blowing yourself up with a rocket gives a point to the last attacker too. 2016-10-20 22:05:50 +02:00
sago007
f06aa8b262 Added the option to move significantly faster under water using a dmflag. Mostly for demonstration. Could be fun in class based gametypes. 2016-10-11 20:47:52 +02:00
sago007
8d8c8fbe35 Some small code fixes 2016-10-11 20:22:58 +02:00
sago007
a538b2eede Added logging events and Win challangex 2016-09-25 12:29:46 +02:00
sago007
ac9135b259 Ok, I discovered that it works as expected. My previous test was wrong. I improved the error message for missing spawn point. 2016-09-24 13:59:32 +02:00
sago007
4c8a0f8142 Different way of applying the NO_BOTS and NO_HUMANS filters. Appears to work except: Does not crash when there are no valid spawn points 2016-09-24 12:59:41 +02:00
sago007
db204cc7fa Removed SelectRandomFurthestSpawnPoint. It is no longer used. The spawn points became to predictive. 2016-09-24 11:50:29 +02:00
sago007
e2fda29ec2 Do now allow missing spawnpoints if cheats is on 2016-09-20 20:26:45 +02:00