Commit graph

46 commits

Author SHA1 Message Date
sago007
eb5796b683 Initialize seed in UI3 2018-12-05 23:36:37 +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
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
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
Poul Sander
7de5b36b46 Code clean up 2018-06-20 20:57:23 +02:00
sago007
741df34b5c Fix a lot of bugs. 2018-05-05 22:36:20 +02:00
sago007
f22e1d9f02 Also added Q_EXPORT to dllEntry for cgmae and ui 2017-09-17 13:05:40 +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
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
9cf841d5f2 Removed all warnings as reported by gcc 6.2.0. 2016-11-27 13:33:42 +01:00
sago007
ce0621e5cc Remplaced a bit of strcmp with strequals 2016-09-11 21:24:56 +02:00
sago007
a7a14b63a9 Added a WP_NUM_INVALID insted of a -1 for weapon numbers. 2016-09-01 18:21:32 +02:00
sago007
ffc45fc43c Replaced "gnu_printf" with "printf" for clang compatiblity. Also fixed a problem with a boolean having 3 different values 2016-09-01 18:12:03 +02:00
sago007
8a2354d8d0 Removed more technical debt 2016-08-02 20:59:06 +02:00
sago007
36acff53a6 Removed more technical dept 2016-08-02 20:41:23 +02:00
sago007
c6c7e7a55e Partial commit while removing technical dept 2016-08-02 20:17:50 +02:00
leilei-
dc6785f569 Applying sago's patch to fix compiling 2016-08-01 00:52:35 -04:00
leilei-
6a979fc8ae - fixing a few forgotten things to get compiling to work
- Possession works
2016-07-30 19:56:46 -04:00
leilei-
b4d6031ef9 big leixperiment merge attempt
- loads of rfactory cg/ui changes for huds and menus
- lfx particles for the renderer
- player animation enhancements
- player model eyes support
- more third person camera stuff
- camera-in-virtual-eyes stuff
- weapon model bobbing stuff
- some other things
2016-07-30 19:20:48 -04:00
sago007
b27e882d3b Replaced !Q_stricmp with Q_strequal in the cases where the stricmp function was used to test for equality.
While the !strcmp is common it is too easy for humans to misread it. I have fixed several bugs caused by people that after a long day no longer read "if the two strings do not compare then they must be equal". Q_strequal is a macro so there are no performance progrem, just easier to read code.
2016-06-29 23:14:29 +02:00
sago007
e9082e302e Removed some warnings. This includes some set but not used variables, printf-attributes and an unsued function 2014-05-17 12:32:06 +02:00
sago007
df7c98fa26 Removed most warnings. It even revealed a problem with true lightning.
I am a bit unsure about the return value of CG_SmokePuff
In places like CG_HasteTrail a LE_SCALE_FADE has been assigned to it. But most places it was just unused. I have removed the unsed versions but I wonder if they should have been assigned a value instead.
2014-05-16 21:15:11 +02:00
sago007@gmail.com
62541ff6f2 ioquake3 r2319
Fix UI player model FOV when using non-640x480 resolution.

(this is great!)


git-svn-id: http://oax.googlecode.com/svn/trunk@310 48ef5666-4144-11de-b6cc-f32266f7ba4a
2012-09-30 16:31:39 +00:00
sago007@gmail.com
7112385765 Some extra checks that was missing
git-svn-id: http://oax.googlecode.com/svn/trunk@303 48ef5666-4144-11de-b6cc-f32266f7ba4a
2012-08-30 19:17:05 +00:00
sago007@gmail.com
45ee5c81c8 Added some extra GCC attributes, changed g_svccmds_ext.c to unix-file format, added "const" in multiple places
git-svn-id: http://oax.googlecode.com/svn/trunk@301 48ef5666-4144-11de-b6cc-f32266f7ba4a
2012-08-12 18:38:28 +00:00
sago007
281b1b3939 ioquake3 revision 2116+extra backport. Some omitted because of Elimination
git-svn-id: http://oax.googlecode.com/svn/trunk@273 48ef5666-4144-11de-b6cc-f32266f7ba4a
2011-09-21 20:46:14 +00:00
sago007
5b73a23455 Added two new dmflags:
DF_INSTANT_WEAPON_CHANGE        64  - Instant weapon switch (weapons must be reloaded)
DF_NO_BUNNY                     128 - Disables Q2-style jumping


git-svn-id: http://oax.googlecode.com/svn/trunk@268 48ef5666-4144-11de-b6cc-f32266f7ba4a
2011-09-10 18:59:47 +00:00
sago007
2e4a68c3ef Fromhell's changes from http://openarena.ws/board/index.php?topic=1933.msg39483#msg39483 and a few defines in menudef.h
git-svn-id: http://oax.googlecode.com/svn/trunk@262 48ef5666-4144-11de-b6cc-f32266f7ba4a
2011-08-01 15:44:13 +00:00
sago007
606948f6c2 A lot of changes from ioquake3.
the following changes has been copied (revision numbers from ioquake3):
1939: Fix player queueing for tournament play (#4939)
1972: Fix spawnflag behaviour for trigger_hurt, patch by DevHC
1973: Fix one byte overflow
1981: ensure that ent->classname is always non-null (for entity numbers up to level.num_entities-1, and ENTITYNUM_WORLD and ENTITYNUM_NONE), for player entities and #ENTITYNUM_NONE in particular, patch by DevHC
1983/1984: Make bg_lib.c strchr ANSI-C conformant
1987: strrchr instead of Q_strrchr
2010: Calls to trap_CM_PointContents don't update their origins based on moving entities (water). Patch by Ensiform
2015: Automatically selecting player model in q3_ui does not work if skin is not specified, patch by Zack Middleton
2016: Grappling hook does not load trail shader, patch by Zack Middleton
2036: Clear game logfile handle after closing file.
2047: TA UI forces overstrike mode on when focusing an edit box, by Ensiform (I have not yet verified this in missionpack)
2048: strchr in video
2051
2056
2063


git-svn-id: http://oax.googlecode.com/svn/trunk@257 48ef5666-4144-11de-b6cc-f32266f7ba4a
2011-07-03 19:09:08 +00:00
sago007
c1f61209f7 Played around with some analyzers. Did not found much but a few obvious mistakes was fixed
git-svn-id: http://oax.googlecode.com/svn/trunk@256 48ef5666-4144-11de-b6cc-f32266f7ba4a
2011-06-28 17:32:55 +00:00
sago007
92417eb7f8 Removed all remaining references to punkbuster. Also removed out commented code.
I kept the outcommented code in case it should cause problem but of all 0.8.1 bugs reported so far punkbuster is not one of them.


git-svn-id: http://oax.googlecode.com/svn/trunk@131 48ef5666-4144-11de-b6cc-f32266f7ba4a
2009-06-18 15:27:41 +00:00
sago007
1363431e4a Fixed wrong gamenames in missionpack server list. Remeved MPlayer as a source option (unfortunatly this requires a workaround because the mplayer constant is hardcoded in the engine)
git-svn-id: http://oax.googlecode.com/svn/trunk@130 48ef5666-4144-11de-b6cc-f32266f7ba4a
2009-06-18 15:15:51 +00:00
sago007
3c92c826ab Missionpack now supports ui_humansonly.
git-svn-id: http://oax.googlecode.com/svn/trunk@129 48ef5666-4144-11de-b6cc-f32266f7ba4a
2009-06-17 20:00:35 +00:00
sago007
74b33598b9 Replaced voteNames with voteflags for tranfering over the network. Can save some chars in the SERVERCONFIG string.
git-svn-id: http://oax.googlecode.com/svn/trunk@104 48ef5666-4144-11de-b6cc-f32266f7ba4a
2009-06-11 22:27:32 +00:00
sago007
6bc96d7055 Backported ioquake3 revision 1311. Adds support for multiply master servers in the server list.
git-svn-id: http://oax.googlecode.com/svn/trunk@82 48ef5666-4144-11de-b6cc-f32266f7ba4a
2009-06-08 20:11:42 +00:00
sago007
4a087ee80f Some missing files
git-svn-id: http://oax.googlecode.com/svn/trunk@3 48ef5666-4144-11de-b6cc-f32266f7ba4a
2009-05-15 14:51:36 +00:00