Commit Graph

1452 Commits

Author SHA1 Message Date
Marco Cawthorne d562533111
NSProjectile: add AnimateOnce() method 2023-01-17 20:23:18 -08:00
Marco Cawthorne fea5ed574f
Shared: add crandom() implementation into defs.h 2023-01-17 16:39:57 -08:00
Xylemon 19d7f30cc4 Replace some Hide calls with Disappear and we don't need this check in TalkMonster anymore 2023-01-17 13:37:03 -08:00
Marco Cawthorne 5f011a28dd
Shared: Removal of Game_Input(). 2023-01-11 17:41:49 -08:00
Marco Cawthorne 179a95088f
NSGameRules: Add overridable methods ImpulseCommand(NSClient, float) and PlayerRequestRespawn(NSClientPlayer).
Game_Input, the game specific function every game had to implement will be
deprecated to streamline the overall codebase. Migrate custom impulses into your gamerule overrides.
This will make it much easier to separate cheat impulse from the multiplayer game too.
2023-01-11 17:12:20 -08:00
Marco Cawthorne 1069468be1
Client: add cvar net_debugUpdates, to show which entity updates.
NSSurfacePropEntity: Add method: TimeSinceDeath()
Also further improvements to consistency of cvars, etc.
2023-01-08 13:18:57 -08:00
Marco Cawthorne 0ac1bc4b68
NSEntity: Add method CanSpawn(bool) which will be used to determine mainly if an entity is to be spawned on the client or server module (but it can also let a class handle under which other conditions it spawns)
NSEntity: move RestoreComplete() into NSIO because NSGameRules needs this.
2023-01-06 13:23:48 -08:00
Marco Cawthorne b2925d46e4
Lots of small clean ups and microoptimisations. ambient_generic has also been fixed in multiplayer and made to save more bandwidth.
Rename a bunch of cvars to be more in a more consitent style similar to later id Tech games.
2023-01-05 23:41:48 -08:00
Marco Cawthorne 6ee21bc0ea
NSEntity: add attribute m_bIsBrush, which will be set if the entity is using a brush model. 2023-01-05 22:30:49 -08:00
Marco Cawthorne dbf511dfb9
NSClientPlayer: add extrapolation of other clients, should be a lot smoother players all around now. 2023-01-05 15:31:25 -08:00
Marco Cawthorne d7012bff5b
Remove debug print that is no longer needed. 2023-01-05 11:36:31 -08:00
Marco Cawthorne 2c5bf43c58
Fixed spectator inputs getting stuck and physics being run twice, due to the recent changes to SV_RunClientCommand. 2023-01-02 18:10:20 -08:00
Marco Cawthorne 534b249ac4
Client: Call Weapons_PreDraw() inside NSClientPlayer's predraw. 2022-12-31 17:49:15 -08:00
Marco Cawthorne 46eae742cb
VGUI: Make sure defaults are filled into the attributes inside Spawned() for inherited ones. 2022-12-30 18:01:47 -08:00
Marco Cawthorne b356994beb
NSTrigger: SetTeam() will now assign an InfoKey to the target, if it's a client. 2022-12-30 13:54:28 -08:00
Marco Cawthorne 4322f1fd93
GS-EntBase: prevent light entities from overriding the first built-in lightstyles.
worldspawn: Assign two more lightstyles that Half-Life registers.
2022-12-30 13:53:42 -08:00
Marco Cawthorne 1bd9a5ea01
Menu-FN: Respect gameinfo_chatroom if it was set from a manifest override. 2022-12-30 12:09:23 -08:00
Marco Cawthorne 7fe51a3fa5
Platform: Fix missing return value change for Achievement_RequestStarts 2022-12-30 11:54:07 -08:00
Marco Cawthorne 27b0c26a12
Documentation improvements for platform, vgui etc. headers and files. 2022-12-30 00:15:10 -08:00
Marco Cawthorne 88131dbb9a
NSClient: add {Set,Get}InfoKey() methods. 2022-12-30 00:12:36 -08:00
Marco Cawthorne 3c71b49b49
Client: Add Cross_ helper functions. This will take care of common crosshair specific rendering tasks, as well as handle third-person and XR versions of crosshairs. 2022-12-28 16:48:57 -08:00
Marco Cawthorne 633046d28e
NSClient: Rename ClientInput() method in NSClient to ProcessInput(), as well as add SharedInputFrame() that can be overriden by the game. 2022-12-28 16:47:44 -08:00
Marco Cawthorne ce7cf4519f
Server: Set cvar s_nominaldistance to 1000 upon init. Dedicated server needs this to play sounds properly. 2022-12-28 15:15:30 -08:00
Marco Cawthorne 81ad389668
cycler: Set the bbox to be that of standing player 2022-12-22 22:48:52 -08:00
Marco Cawthorne 4f37e31677
Client: Fix /n to \n replacement mapping in fun-strings, used by game_text
and titles.txt type text overlays.
2022-12-22 17:29:05 -08:00
Marco Cawthorne 142d69b66a
Remove Game_RunClientCommand() entirely, as it will be replaced by a game-mode equivalent. 2022-12-22 16:54:11 -08:00
Marco Cawthorne 466787b3ff
env_shooter: set skin on the gib entity. 2022-12-22 16:53:41 -08:00
Marco Cawthorne ff7ce15399
SV_ParseClientCommand: Forgot to pass the default case over to clientcommand(). That is now fixed. 2022-12-22 16:29:02 -08:00
Marco Cawthorne 6c8d785ce2
env_shooter: Respect rendering modes, also add support for the 'shootsounds' key. snark_pit will be more complete now. 2022-12-22 13:02:45 -08:00
Marco Cawthorne 1acbd8a34d
Remove calls to Game_ParseClientCommand with per-gamemode overridable ClientCommand() method within NSGameRules.
Also redo the way chat messages are handled, so mods don't have to implement it themselves all the time.
2022-12-22 11:53:15 -08:00
Marco Cawthorne da4501a90d
multi_manager: m_iValue needs to be set TRUE on the multi_manager_sub. 2022-12-21 17:10:25 -08:00
Marco Cawthorne 3eb85ae400
Documentation improvements to various headers, also g_developer prints. 2022-12-21 17:09:35 -08:00
Marco Cawthorne 30bbede463
Client: Fix network error when receiving shake event as spectator. 2022-12-21 13:46:55 -08:00
Marco Cawthorne 2d911109cc
trigger_relay: Set m_iValue so that multisources will work properly that get targetted by them
trigger_auto: Delay the trigger of them in singleplayer until 1 player has joined
Misc cleanups. The 'Janitor Simulator' on TWHL should work now.
2022-12-14 16:51:16 -08:00
Marco Cawthorne 33295ff409
env_beverage/item_food: Fix item_food not rendering and or spawning. 2022-12-13 23:16:00 -08:00
Marco Cawthorne 94d5d5408c
GS-EntBase: Adjust QUAKED comments so they can be parsed by Doxygen. 2022-12-13 17:52:20 -08:00
Marco Cawthorne dfcf0d183d
NSMonster: Gib properly using Disappear() instead of Hide() 2022-12-13 17:45:33 -08:00
Marco Cawthorne 711548465a
env_beam/env_laser: Visual overhaul of env_beam. env_laser now also rebased using my work on env_beam. 2022-12-08 14:58:30 -08:00
Marco Cawthorne 0f9439b956
env_beam: Initial implementation. Visual fluff still missing, but coming up! 2022-12-07 17:05:50 -08:00
Marco Cawthorne 67634bf6e5
env_beam: move from gs-entbase/server to gs-entbase/shared 2022-12-07 12:48:34 -08:00
Marco Cawthorne 56ec44700a
Lots of cleanup related to many entity classes to aid doxygen with generating documentation. 2022-12-06 15:04:07 -08:00
Marco Cawthorne 6f3a1d1d52
infodecal: set drawmask in the constructor, fixes decals not rendering. 2022-12-06 01:11:35 -08:00
Marco Cawthorne 0891d9ea65
Platform: Set net_masterextra1 to broadcast. 2022-11-30 22:25:08 -08:00
Marco Cawthorne 82653683ba
Client: add the following console commands for debugging: listModels, listSounds, listParticles 2022-11-30 17:51:07 -08:00
Marco Cawthorne 41ccbca2aa
GS-EntBase: Fix some more places where remove() was being called directly when it shouldn't be 2022-11-30 17:26:50 -08:00
Marco Cawthorne b593c2694b
GS-EntBase: use Destroy() over remove() where applicable. 2022-11-30 16:55:17 -08:00
Marco Cawthorne 74b61f35ed
Print a warning + backtrace when we manually call remove() on an entity that hasn't been destroyed properly. 2022-11-30 16:47:24 -08:00
Marco Cawthorne 2c6da152ed
Clean up more and more warnings fteqcc yells about 2022-11-30 14:21:55 -08:00
Marco Cawthorne 29a1bea943
Misc consistency cleanups 2022-11-22 22:37:07 -08:00
Marco Cawthorne 2265047bfe
Fix a bunch of nonvirtual/virtual mismatching going on that's been caught by the new compiler. 2022-11-16 14:04:10 -08:00
Marco Cawthorne ecf5988584
PropData: Breakmodels now spawn fully client-side! This will remove a lot of network overhead. 2022-11-14 19:50:23 -08:00
Marco Cawthorne cbc8fda92a
PropData: Might as well extend the syntax to allow for more than just submodel specification. BreakModel text definition can now also override rendercolor, renderamt, rendermode and renderfx! 2022-11-11 17:06:35 -08:00
Marco Cawthorne 440f4b047f
PropData: Rewrite how BreakModel entries are precached, now that the model line no longer is just a path to a model. 2022-11-11 15:31:38 -08:00
Marco Cawthorne 8b15c59ecd
func_breakable: use BreakModel_Spawn instead of FX_BreakModel. 2022-11-11 15:04:33 -08:00
Marco Cawthorne 5f126516c6
Server: Add new global g_dmg_vecLocation, which gives an approximate damage impact location. 2022-11-11 15:04:11 -08:00
Marco Cawthorne 1b6cb974ed
PropData: Add Nuclide specific extension that allows developers to specify which submodels to use when spawning 'BreakModel' gibs. 2022-11-11 15:03:17 -08:00
Marco Cawthorne 39854c0740
NSClientPlayer: UpdatePlayerAnimation() is now calling when running player physics, and also run seperately for non predicted player entities during predraw. 2022-11-11 14:18:14 -08:00
Marco Cawthorne 298ba7a041
NSTraceAttack: offset decals a little when placing them near a wall so they don't count as inside of them on certain angles. 2022-11-10 17:21:56 -08:00
Marco Cawthorne bb92aaf37f
NSClientPlayer: Fix ladder climbing sounds from not playing. 2022-11-10 15:41:42 -08:00
Marco Cawthorne 841e89e2c5
Physics_WaterMove: Fix the mistake of changing watertype to WaterLevel() which were two different things. 2022-11-02 14:44:26 -07:00
Marco Cawthorne e9f735adc5
NSVehicle: Remove any velocity from the driver when they're attached to a vehicle. 2022-11-01 20:16:25 -07:00
Marco Cawthorne 003bc5d88a
Removal of Footsteps_Update outside of NSClientPlayer. Mods now have the full ability to override steps within the player class. Method name subject to change. 2022-11-01 19:54:56 -07:00
Marco Cawthorne 606edfadcc
Get rid of unused functions inside src/client/predict.qc that were long deprecated. 2022-11-01 19:23:18 -07:00
Marco Cawthorne 843dcc8284
Kill src/client/player.qc. We now have overridable methods dedicated for updating player animations, attachments and more inside NSClientPlayer.
Some of these APIs are still subject to change but they're being deployed in TW 1.35 right now.
2022-11-01 19:12:40 -07:00
Marco Cawthorne 2945e1f65d
Add support for Source Engine decal groups (scripts/decals.txt). 2022-10-27 20:04:11 -07:00
Marco Cawthorne 36fdd443d2
Change 'material' over to 'surfaceprop'. Implement new networked event EV_SURFIMPACT.
Surfaceproperty impacts are now fully done on the client. Server has no concept of
impacts beyond the point of announcing them.
The next step: NSTraceAttack should be fully shared between client/server so
that the local player doesn't need to be told about their own EV_SURFIMPACT events
by the server, thus saving a bit of bandwidth.
2022-10-26 12:50:08 -07:00
Marco Cawthorne dcfdf531ce
Move the duties of hlmaterials.txt into surfaceproperties.txt, since Source has a 'gamematerial' keyword we should use instead. 2022-10-16 00:36:18 -07:00
Marco Cawthorne f01e90ad2e
Merge material property definitions into the surfaceproperties system to streamline
everything more and to allow level designers custom properties without recompiling
the game-logic. This will also make it more Source Engine compatible.
2022-10-15 22:43:32 -07:00
Marco Cawthorne db2d3b1730
Get rid of hlmaterials.qc by making the look-up happen fully within NSMaterial.qc as part of the newly unified material routines.
There's also a new file (hlmaterials.txt) that is subject to change which will allow you
to add many custom material definitions without hard-coding a thing. Which fixes conflicts between different GoldSrc games.
2022-10-15 20:32:40 -07:00
Marco Cawthorne 7ad6d9c457
Make games buildable again, caused by renaming Spraylogo and GameRules classes/files. 2022-10-14 15:49:59 -07:00
Marco Cawthorne e499a7d484
Documented the Nuclide System (NS) classes. 2022-10-14 13:08:47 -07:00
Marco Cawthorne d4ce7cb8c2
Documentation: started documenting all the functions in src/server/entry.qc 2022-10-10 12:30:31 -07:00
Marco Cawthorne 3a280f70f9
Documentation: Start documented all entry functions in src/client/entry.qc 2022-10-10 11:45:23 -07:00
Marco Cawthorne 45d58a8742
leave comment in base/mapcycle.txt 2022-10-03 14:43:52 -07:00
Marco Cawthorne 0713c390b9
Menu-FN: Force _pext_vrinputs to 0 upon init, as the physics will otherwise break. (FTEQW issue) 2022-09-25 16:29:20 -07:00
Marco Cawthorne b92a3a9da5
PMove_Custom: Go over some checks, one trace_fraction check was wrong and caused us to not slide along rotating brushes (doors) properly. 2022-09-12 23:07:33 -07:00
Marco Cawthorne 3117042eef
NSRenderableEntity: give glowmod more precision over the network for shader enhancements... 2022-09-12 22:32:02 -07:00
Marco Cawthorne 2838984603
NSRenderableEntity: Network .frame1time whenever .frame changes. 2022-09-12 14:06:31 -07:00
Marco Cawthorne b3755bf0a2
func_pushable: func_pushables shouldn't collide with anything but BODY type objects for now
to work around the collision issues on maps such as cs_estate
2022-09-12 14:01:51 -07:00
Marco Cawthorne 30195592ce
PMove_Custom: add LADDERFACING define so mods can decide whether clients have to face a ladder brush in order to climb it.
PMoveCustom_AccelLadder: calculate jump velocity depending on the direction facing the ladder.
2022-09-12 08:17:20 -07:00
Marco Cawthorne 843ef32908
PMove_Custom: unset the FL_ONLADDER flag when not directly facing a ladder 2022-09-11 14:14:40 -07:00
Marco Cawthorne 02a1218ee7
func_vehicle: unset any velocity applied to our driver, since they're sticking to us. 2022-09-11 13:56:11 -07:00
Marco Cawthorne 2aa6917026
Get rid of this debug line in NSTalkMonster 2022-09-10 11:21:13 -07:00
Marco Cawthorne 6c7e3e8c06
NSRenderableEntity: add new overridable method (void) HandleAnimEvent(float, int string)
Also fix the mouth-flapping on NSTalkMonster.
2022-09-10 09:56:15 -07:00
Marco Cawthorne 30a482e80e
NSVehicle: add two new overridable methods. (bool)PreventPlayerMovement and (bool)PreventPlayerFire 2022-09-08 13:59:18 -07:00
Marco Cawthorne 04fe295035
NSVehicle: don't change the drivers' movetype 2022-09-08 13:38:02 -07:00
Marco Cawthorne 9deb12b68d
func_breakable: This still used Hide() for some reason, changed to Disappear()
Misc cleanup.
2022-09-02 22:02:54 -07:00
Marco Cawthorne 5a7d082af7
Move touch handlers into NSTrigger, remove trigger_multiple's own version of the team check. 2022-08-31 15:18:06 -07:00
Marco Cawthorne 31bb9b4042
Abstract timers to make sure MOVETYPE_PUSH entities are handled without game/mod developers having to think much about them.
Also change rechargers to MOVETYPE_NONE instead of PUSH, as it won't be moving anyway.
2022-08-31 13:24:55 -07:00
Marco Cawthorne 05eb10904e
func_vehicle: Make it shared/predicted. The smoothest it's ever been! 2022-08-28 09:20:34 -07:00
Marco Cawthorne 1bb1f03167
Tweak item_pickup/drop behaviour a little 2022-08-27 22:07:03 -07:00
Marco Cawthorne 9e675c212d
Implement 'cleardecals' client command, as well as an SVC_CGAMEPACKET for servers to request clients' clear their decal cache. 2022-08-27 22:05:31 -07:00
Marco Cawthorne 27529eb3a6
NSTimer: Add SetupTimer(entity, void(), float, bool) and RunTimer() methods. 2022-08-27 11:21:11 -07:00
Marco Cawthorne 267a956ec9
NSEntity: add Disappear() method. Mods that used Hide() to remove an entity from the active game will have to switch to this instead. 2022-08-27 11:20:38 -07:00
Marco Cawthorne 7a252ad213
NSEntity: new methods to simplify a lot of common tasks added. ScheduleThink(void(), float) and WithinBounds(entity) will surely be helpful.
Went over gs-entbase/server and made sure to use the new Think handlers to safely deal with MOVETYPE_PUSH
and handle any fun edge cases where time may be 0.0f.
func_breakable has also been fixed, since the changed Show/Hide behaviour prevented
them from getting destroyed fully.
2022-08-26 15:39:00 -07:00
Marco Cawthorne acaa918403
NSTimer: initial implementation of an object timer. Handles temporary (self garbgage collecting) timers as well. 2022-08-25 18:52:04 -07:00
Marco Cawthorne c67e4b5276
NSView: move constructor and set the sensitivity defaults. 2022-08-25 18:35:20 -07:00
Marco Cawthorne adecdb12f3
NSView: add get/set Sensitivity methods 2022-08-25 18:31:33 -07:00
Marco Cawthorne 146051dd67
Proper nonvirtual declarations for class methods. 2022-08-24 15:11:04 -07:00
Marco Cawthorne a6da238e53
effects.h: Document EF_GREEN, which I missed. 2022-08-24 14:44:16 -07:00