Commit graph

419 commits

Author SHA1 Message Date
sago007
eb5796b683 Initialize seed in UI3 2018-12-05 23:36:37 +01:00
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
sago007
d1efb33b70 Changed the return statement. qtrue simple means that it was recognized. 2018-12-05 22:46:28 +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
15b2a78e40 Wrong check for command 2018-12-05 19:00:59 +01:00
Poul Sander
2c46048a6a Add randomFloatToCvar command. 2018-12-05 18:59:48 +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
NeonKnightOA
27ad924cb4 Leilei changes for the MP UI. (#40)
* Toggleable missionpack checks. Disables team models and relevant checks interfering with testing. Some comments were also modified in order to work with SciTE.

* 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.

* Committing leilei's changes from the leilei-cosmetic2 branch for the UI3.

* Now it compiles.
2018-12-04 18:32:31 +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
b6ff88cee0 Missionpack checks
NeonKnight description:
I had disabled these pieces of code in order to test important stuff for the SP. However, instead of commenting them out, I thought it would be better, in case team models are going to be implemented in a future (the idea itself is good, I can see clans creating their own model with exchangeable heads), to just create a toggleable cvar.

The cvar is cg_missionpackChecks.

Also some pieces of commented code weren't parsed well in some editors, so I've changed the commenting format.

Squashed commit of the following:

commit 63ae78034d7ac04c08dc2f6184982b8dbebe8914
Author: sago007 <poul@poulsander.com>
Date:   Sat Dec 1 22:26:23 2018 +0100

    Minor indentation fixes and replaced the != 0 for boolean type cvar

commit 1ea163529a
Merge: 0027cfc d967ac8
Author: NeonKnightOA <openarena.arg@gmail.com>
Date:   Sat Dec 1 12:44:30 2018 -0300

    Merge branch 'master' into mpchecks

commit 0027cfc39b
Merge: 63d8bd1 0bee41a
Author: NeonKnightOA <openarena.arg@gmail.com>
Date:   Sat Dec 1 10:55:59 2018 -0300

    Merge branch 'master' into mpchecks

commit 63d8bd1dcb
Author: Neon_Knight <openarena.arg@gmail.com>
Date:   Sat Dec 1 10:53:10 2018 -0300

    Just to make the code cleaner.

commit 2dea58d8d6
Author: Neon_Knight <openarena.arg@gmail.com>
Date:   Wed Nov 28 22:30:05 2018 -0300

    Better marked the checks.

commit 91a9d07ef6
Author: Neon_Knight <openarena.arg@gmail.com>
Date:   Wed Nov 28 22:16:43 2018 -0300

    This now works.

commit 821342a2a3
Author: Neon_Knight <openarena.arg@gmail.com>
Date:   Wed Nov 28 22:11:02 2018 -0300

    An additional cvar, ui_missionpackChecks, had to be created.

commit 43bf272a06
Author: Neon_Knight <openarena.arg@gmail.com>
Date:   Wed Nov 28 21:56:19 2018 -0300

    Forgot this.

commit 6601f06131
Author: Neon_Knight <openarena.arg@gmail.com>
Date:   Wed Nov 28 21:48:55 2018 -0300

    Syntax error. -.-

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

    Missionpack checks. Disable team model check and SP-specific code. Also some comments were modified in order to work with SciTE and other editors.

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 22:28:24 +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
0d43362795 Stopped setting com_hunkmegs in the UI. It was a workaround from before it was changed in the engine. 2018-11-28 22:59:09 +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
c69a386999 A last change to account for Possession in a check which Codacy found out. 2018-11-28 21:53:35 +01:00
Neon_Knight
0b1a72277d Last minute fixes and changes. Including check pass fixes and the fraglimit check. 2018-11-28 21:53:01 +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
57fadbe503 Added weapbest command. Selecting the best weapon. Also made BFG the ultimate weapon 2018-08-14 22:52:39 +02:00
sago007
ef0e8820d8 Keybind labels now how the same color as other labels. Elements where you can rebind the key still have a lighter color. I don't like that but I guess there is a reason 2018-08-13 19:40:59 +02:00
sago007
c0e1b828de Introduced a CG_GetBestWeapon which returns the best weapon that the player has ammo for. Used after out-of-ammo 2018-08-12 14:14:58 +02:00
sago007
e46109d9ac Change the whitespace in the vote files to match 2018-08-12 13:26:28 +02:00
sago007
9abacaa44c Made the vote menu even more generic 2018-08-11 14:44:38 +02:00
sago007
2d6f7a1c16 Typo 2018-08-11 13:55:48 +02:00
sago007
9e3969c5e5 Try to simplify some of the repeated lines. Testing on vote menu 2018-08-11 13:54:27 +02:00
sago007
82c30c29e7 Select best weapon when out of ammo 2018-08-11 12:44:12 +02: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
sago007
2ba25b97b9 Add Q_EXPORT to ui_mian.c
As reported on https://github.com/OpenArena/gamecode/issues/25
2018-05-05 20:52:19 +02:00
sago007
feaff266af Extracted the Q1 muzzle flash from CG_AddPlayerWeapon to make it shorter 2018-02-11 18:26:18 +01:00
sago007
335555776f Removed a lot of "cg_muzzleflashStyle.integer != 0". It would always be true 2018-02-11 18:11:57 +01:00
sago007
b5ff1c24be All custom Muzzles uses early return 2018-02-11 18:06:39 +01:00
sago007
3c5aa3a0a0 Some misleading indention 2018-02-11 15:04:31 +01:00
leilei-
40bd843d54 - cg_muzzleflashStyle - alternative flash styles for player preference, or "aesthetic," or maybe just less flashing (flashes can also be disabled)
- better pronouns
- player torso pitches again
- don't make impact explosions for weaposn if particles are enabled.  this stops potential hitches/artifacts/flashes
2017-12-12 05:18:57 -05:00
sago007
ca4c1ffcc4 Refactored to have fewer lines 2017-10-07 17:17:18 +02:00
sago007
e32fceeaf6 Updated the old UI a bit. Made it a few lones shorter 2017-10-07 16:40:44 +02:00