Commit Graph

3078 Commits

Author SHA1 Message Date
Zack Middleton 5aa7fb39c2 OpenGL2: Remove two unused cvars and update readme 2017-07-02 16:47:55 -05:00
Zack Middleton cbd9e432b5 Fix nonresponsive favorites in q3_ui having no hostname
ArenaServers_InsertFavorites() fails to do anything because favorites
are added to the server list even if nonresponsive.

Set nonresponsive favorite server hostname to address.
2017-07-01 14:26:36 -05:00
Zack Middleton 8c3d1fcf59 Allow changing q3_ui server source during refresh
This makes it easier to scroll through the list, especially since
"Local" source now refreshes until a local server is found.
2017-07-01 14:17:45 -05:00
Zack Middleton 0ba359c29e Make UI continue searching for local servers until found
When refreshing local servers, Team Arean UI never changed the status
message when it timed out. This gave a false impression it was still
looking for servers.

Let's continue looking for local servers in q3_ui and Team Arena UI
until one is found.
2017-07-01 14:17:22 -05:00
Zack Middleton 21eeaee9c8 Make Team Arena UI aspect correct in widescreen 2017-07-01 11:27:42 -05:00
Zack Middleton d9c2e91919 Fix q3_ui cursor going off screen in widescreen 2017-07-01 11:27:22 -05:00
Zack Middleton e77153766a OpenGL2: Draw sun shadows for first person IQM player models
This makes IQM have the same behavior as MD3 and MDR.
2017-06-30 14:07:26 -05:00
Zack Middleton 102c79eb49 OpenGL2: Fix black planar projection shadows (cg_shadows 3)
Restore MD3 code for cg_shadows 2 and 3 like other model formats.
Fix planar projection shadow deform (cg_shadows 3) to use correct
light direction. I fixed light direction for stencil shadows
(cg_shadows 2) but it's still broken.
2017-06-30 14:06:13 -05:00
Zack Middleton 09a23e0417 OpenGL2: Fix checking r_shadowCascadeZFar pointer instead of value 2017-06-29 21:36:04 -05:00
Zack Middleton 4b5067cce2 Add 'addbot random' to README 2017-06-29 19:57:13 -05:00
Zack Middleton b984dd4a23 Add range check for bot skill in addbot command
Adding a bot with skill of 0 doesn't show icon on hud.
2017-06-29 19:43:37 -05:00
Zack Middleton cabc32362c Don't pick duplicate random bots until all bot types are added
Don't add the same bot to multiple teams until there are as many
bots on the server as there are bot types.

Previously each team would have unique bots until all bot types
were added to the team but other teams may have the same bot. Now
there will not be any duplicate bots until there are more bots than
bot types.

Now Quake 3 (32 bot types) in 16 vs 16 bot CTF will not contain
duplicate bot types. (You have to increase memory in code/game/
g_mem.c in order to add 32 bots though.)

I had to change G_AddRandomBot() to use 'addbot random' or else the
same bot could be added to red and blue teams. The bot was selected
and stored in console command buffer so game doesn't know not to
select the bot again.
2017-06-29 19:41:17 -05:00
Zack Middleton 0999aff28d Fix duplicate (delayed) random bots being choosen
Count delayed bots when looking for least used bot infos for deciding
which bot to add.
2017-06-29 19:41:17 -05:00
Zack Middleton d8f2ff7a4b Check delayed bot's team when counting bots for bot_minplayers
note: This requires my previous commit that added teampref userinfo
so that bots choose correct team in ClientConnect.
2017-06-29 19:41:17 -05:00
Zack Middleton 7c601da651 Fix not adding random bot when all bot info are in use on team
If there are two bot infos in scripts/bots.txt then each team can
only add two random bots via bot_minplayers or addbot random.

Pick random bot info from least used bot infos instead of only ones
that are used by zero players. That way a random bot can always be
added to the game.

This rarely affected Quake 3 since there is 32 bot infos. It could
easily affect new games though.
2017-06-29 19:41:16 -05:00
Zack Middleton d0d1fe1b7c Fix bot_minplayers passing delay as team to addbot in non-team gametypes 2017-06-29 19:41:16 -05:00
Zack Middleton 51649695a5 Fix random bot not looking for bots by funname
Quake 3's Anarki bot has a 'funname' with colors in it.
This commit fixes Anarki not being detected as in use.
2017-06-29 19:41:16 -05:00
Zack Middleton 23a331c9f8 Make 'addbot random' command select a random bot info
It reuses the random bot selection code for bot_minplayers cvar.
2017-06-29 19:41:16 -05:00
Zack Middleton 007e250e11 Split G_AddRandomBot into multiple functions 2017-06-29 17:52:06 -05:00
Zack Middleton ccfc9011e2 travis-ci: Upgrade to docker build system 2017-06-24 20:51:07 -05:00
Zack Middleton 2e5c4bd96a travis-ci: Don't run coverity_scan on master branch
Once the weekly limit for Coverity scan is reached all builds exit
success without compiling.
2017-06-24 20:48:11 -05:00
Zack Middleton 03336dd0bf Allow spectators to use noclip cheat 2017-06-24 20:27:24 -05:00
Zack Middleton 7b9ccd1463 Have spectator always be in first person
Flying around in third person with no body is weird.
2017-06-24 20:25:39 -05:00
Zack Middleton c2ca5e7856 Check for unlimited time power up using INT_MAX
It is possible for a power up to exceed 999 seconds without it being
unlimited time.
2017-06-24 20:25:39 -05:00
Zack Middleton 520b100449 Make cg_teamChatsOnly only affect team gametypes
Also made it so that 'tell voice chats' are always allowed for
consistancy with 'tell chat'.

Reported by Tobias Kuehnhammer.
2017-06-24 20:25:39 -05:00
Zack Middleton f19efb77c8 Fix Team Arena team base models not dropping to floor
Team Arena's Overload gametype has red and blue team Obelisk base
objects. It uses separate entities for visual and damage. Only the
damageable entity was dropped to floor. Leaving model floating off
the ground.

Team Arena's Harvester base has the same problem. Model entity
floats in air but trigger entity drops to floor.

Drop all Team Arena team base models to floor. Fixes CTF, 1Flag,
Overload, and Harvester base models.
2017-06-24 20:15:02 -05:00
Zack Middleton f7c3276fe8 Fix g_teamAutoJoin and g_teamForceBalance
There are various issues caused by not knowing the initial team for
the local client and bots when they connect. This is can be reproduced
by starting a team game from the main menu.

When g_teamAutoJoin is enabled, bots and local client join a random
team at connect and then execute their team command a few frames
later. This may result in the player being killed if they specify a
different team. In Team Arena's Harvester mode this causes harvester
skulls to be spawned at the beginning of the game.

When g_teamForceBalance is enabled, the local client and bots may not
be able to join their desired team. This may result in them being
spectators. If g_teamAutoJoin is also enabled they may be left on
the opposite (red/blue) team they were meant to join.

There is a hack for including bot's team in their player info string
(used by cgame for which team skin to use) before the bot joins
their desired team. Bots aren't guaranteed to join their desired team
(as may happen when both g_teamAutoJoin and g_teamForceBalance are
enabled) so clients may see them as being on the wrong team!

----

Add teampref userinfo option for team preference. If teampref is set
it will be used for attempting to join the team immediately at connect.

Bots now join team at connect using teampref userinfo. So remove
the hack for setting bot's team in player info string before the bot
joins the team.

To avoid the client sending teampref userinfo to all network servers,
the local client uses a g_localTeamPref cvar. The g_localTeamPref
cvar is cleared after it's used so it doesn't get used when starting
another server later. Another reason not to use a teampref userinfo
cvar is there isn't a reliable way to clear it in CGame/UI which are
likely loaded from baseq3 pk3.

Make it so g_teamAutoJoin doesn't affect clients who specify
teampref. If teampref is invalid, the client will join a random team
like g_teamAutoJoin.

Don't apply g_teamForceBalance to the local client or bots. Otherwise
they may be left as spectators when starting team game from menu.

The start server menus use team command and g_localTeamPref to set
the human player's team. This way it's compatible with vanilla Q3
game VMs and the new setting team at connect feature.
2017-06-22 21:56:20 -05:00
SmileTheory e03cdf444c OpenGL2: Remove SF_VAO_MESH. 2017-06-16 16:52:53 -07:00
Zachary J. Slater fd3b58b967 Merge pull request #293 from rcgordon/autoupdater-rsa-signature 2017-06-10 21:00:51 -10:00
Zack Middleton e9436abff0 Only allow connectionless print/echo from server/rcon address
Reported by Ensiform.
2017-06-10 19:15:26 -05:00
Zack Middleton dfce71929a Add con_autochat and con_autoclear cvars 2017-06-08 15:46:19 -05:00
Zack Middleton c12b81a273 Fix strncpy usage in botlib
All usage of strncpy in botlib should now either set string
terminator or use Q_strncpyz.
2017-06-07 21:48:01 -05:00
Tobias Kuehnhammer 8956ab41dd Fix notarget cheat
Bots no longer target players in 'no target mode'.
2017-06-07 21:27:33 -05:00
Zack Middleton c99281a0da Make bots stop attacking player after disconnect
Bots did not notice player disconnected, so they kept attacking
the last known position.

Checking if entity is valid in BotEntityVisible might fix other
similar issues too.
2017-06-07 21:11:52 -05:00
Zack Middleton 9aae0948ab Remove unused define MAX_COMMANDARGUMENTS from be_ea.c 2017-06-07 21:11:38 -05:00
Zack Middleton 74a59f17c7 Don't copy p->org to itself in cg_particles.c 2017-06-07 21:07:42 -05:00
Zack Middleton 8a6c9d1038 Remove unneeded 'angles' variables/clearing in ai_dmq3.c 2017-06-07 21:06:28 -05:00
Zack Middleton 730b917059 Fix comment in BotAIPredictObstacles 2017-06-07 20:53:35 -05:00
Zack Middleton a738cb9592 Fix overdraw in CG_DrawRect
It was noticeable in the corners when alpha was less than 1.
2017-06-07 20:40:16 -05:00
Zack Middleton 1a8bf792e7 Range check client number for trap_BotUserCommand 2017-06-07 20:38:12 -05:00
Zack Middleton 5b9302a7ef Don't start game entity loops at index 1 2017-06-07 20:32:57 -05:00
Zack Middleton 71512bb1fd Show client's name in callvote clientkick vote display message
Make callvote always kick by client num so player can't rename to
avoid being kicked. Don't allow calling a vote to kick host or
non-existent players.
2017-06-07 20:24:10 -05:00
Zack Middleton eeb28dc1d0 Fix score info being dropped by server
Server drops reliable command string if it's length is more than 1022.
2017-06-07 19:55:36 -05:00
Zack Middleton 91acf8a681 Don't build score info for bots, they don't parse it 2017-06-07 19:54:34 -05:00
Zack Middleton b511b8f2f6 Fix Coverity warning that endVelocity is uninitialized 2017-06-07 19:51:32 -05:00
Zack Middleton c96acec428 Fix (unused) check for map restart in CG_TransitionSnapshot 2017-06-07 19:42:32 -05:00
Zack Middleton 1456008d96 Fix comment for CG_SetInitialSnapshot 2017-06-07 19:41:46 -05:00
Zack Middleton 1048073e26 Unify checks for missing COM_Parse() token 2017-06-07 19:16:05 -05:00
Zack Middleton d58234a6c7 Fix 'missing token' in parsers for animations.cfg 2017-06-07 19:06:41 -05:00
Zack Middleton 6e340f9a5b Don't use uninitialized ps from BotAI_GetClientState
If BotAI_GetPlayerState returns qfalse, ps is untouched and in
some cases means uninitialized. So don't use it if not valid.
2017-06-07 19:02:20 -05:00