Compare commits

...

251 Commits

Author SHA1 Message Date
stiffly 8e9ddc7b9d playerJump is only done for local player. 2016-03-12 17:51:06 +01:00
stiffly cc10e5500b 2x jump now only plays for local player 2016-03-12 15:31:44 +01:00
stiffly 9bac141a6b WIP fixing pull request 2016-03-12 15:14:36 +01:00
stiffly 9942747d41 WIP pull request fixes 2016-03-12 14:26:09 +01:00
stiffly 28d576bfc0 Now the bgm should loop again. 2016-03-11 21:04:33 +01:00
stiffly 66d0f9fa47 Added menu music 2016-03-11 20:28:09 +01:00
stiffly 157a54e845 Merge remote-tracking branch 'origin/master' into Kill-streak-sounds 2016-03-11 18:19:22 +01:00
Tleety 7759af2c5a Log remove 2016-03-11 15:52:47 +01:00
antc13 ac096bbf77 Merge branch 'master' of https://github.com/teamfisk/TacticalZ
# Conflicts:
#	resources/Schema/Entities/CP_Rocky2.xml
2016-03-11 15:46:39 +01:00
antc13 81634578d9 Updated CP_Rocky2, added a point light to pickups and created 3 different versions of the Floating Crystals above Capture Points. 2016-03-11 15:43:20 +01:00
Tobias Dahl 2f61171d16 Merge pull request #185 from teamfisk/TextColor
Text that handles color, alpha and icon parsing
2016-03-11 15:25:06 +01:00
Tobias Dahl aa16a15693 Merge pull request #205 from teamfisk/Menu
Menu
2016-03-11 15:23:13 +01:00
Tleety 26337ff243 Merge remote-tracking branch 'origin/master' into Menu 2016-03-11 15:07:52 +01:00
FakeShemp 7bdb0d410f Merge branch 'master' of github.com:teamfisk/TacticalZ 2016-03-11 15:04:52 +01:00
FakeShemp 172fb8dfc2 MuzzleFlash entities 2016-03-11 15:04:44 +01:00
Tleety 0ca627eb8b Merge remote-tracking branch 'origin/master' into Menu 2016-03-11 14:57:59 +01:00
Tobias Dahl 530c0fd9b0 Merge pull request #204 from teamfisk/RendererBugFixes
Getting ShaderID fewer times
2016-03-11 14:57:36 +01:00
William Moberg f036817c0c Merge pull request #203 from teamfisk/SplitSnapshots
Split snapshots
2016-03-11 14:35:18 +01:00
Jocke e45d0e8232 fix. 2016-03-11 14:32:55 +01:00
William Moberg 8ebf818c19 Merge pull request #206 from teamfisk/CapturePointFixBranch
CapturePointSystem now sets all children visible/not visible for each
2016-03-11 14:26:45 +01:00
Jocke 62d1cb9a69 fixed request. 2016-03-11 14:24:59 +01:00
Tobias Dahl edb305b307 Merge pull request #175 from teamfisk/EntitiesWithoutTransform
No crash on missing transform in editor system.
2016-03-11 14:20:23 +01:00
verysecrethero 0aedeb61b4 CapturePointSystem now sets all children visible/not visible for each red/blue/spectator 2016-03-11 14:15:46 +01:00
Tleety 44398eac58 Options now has some different resolutions. 2016-03-11 14:11:58 +01:00
Jocke 06bddd9d54 Fixed requests. 2016-03-11 14:07:03 +01:00
Tleety 4937bee46a Unresolved externals shit 2016-03-11 13:38:48 +01:00
Tleety bb0531a459 WIP 2016-03-11 13:10:08 +01:00
Tleety 8bd38bc465 Merge branch 'Menu' of github.com:teamfisk/TacticalZ into Menu 2016-03-11 13:00:43 +01:00
Tleety 8ceaae995d Options menu started working on 2016-03-11 13:00:34 +01:00
Jocke 5f959ded89 Did changes upon pull request's request. 2016-03-11 12:54:59 +01:00
Jocke 0fbc482f9c Changed getters to return reinterpret_casted data. 2016-03-11 12:22:55 +01:00
Jocke 2eb863757b renamed variabels 2016-03-11 11:55:16 +01:00
Teejoon 91aedcbb14 Merge branch 'Menu' of https://github.com/teamfisk/TacticalZ into Menu 2016-03-11 11:41:11 +01:00
Teejoon cac0522ae7 Fixed glow on window resize 2016-03-11 11:41:02 +01:00
Tleety 26dde21e3d Merge branch 'Menu' of github.com:teamfisk/TacticalZ into Menu 2016-03-11 11:32:18 +01:00
Tleety 23e6a15c7f Fixed the fill on sprites, added some config button components, started work on option menu 2016-03-11 11:31:53 +01:00
Teejoon e96ad44e44 BlurHUDPass now works correct when resizing window. 2016-03-11 11:23:23 +01:00
stiffly a3ab844cc4 Makes sure m_CurrentSelection is valid before using it. 2016-03-11 11:12:49 +01:00
stiffly 03493df213 Merge remote-tracking branch 'origin/master' into EntitiesWithoutTransform 2016-03-11 11:06:23 +01:00
Jocke 7febb7681c Merge remote-tracking branch 'origin/master' into SplitSnapshots 2016-03-11 11:05:41 +01:00
Teejoon e000408593 Getting ShaderID one time per material in total instead of one time every frame 2016-03-11 11:03:09 +01:00
Jocke 33627f917c removed debug info. 2016-03-11 11:01:10 +01:00
verysecrethero 0869afd529 Merge pull request #193 from teamfisk/BoxModelCollision
Removed collision jittering effects
2016-03-11 10:48:25 +01:00
Adam Byléhn 56a13d03fc Merge pull request #197 from teamfisk/SpectatorCamera
Properly unlocked mouse
2016-03-11 10:43:29 +01:00
Adam Byléhn dad18a200f Merge pull request #202 from teamfisk/Trigger
Triggersystem updated for the capturepoints
2016-03-11 10:38:20 +01:00
Tleety dab58e09a0 Merge branch 'master' into Menu 2016-03-11 10:20:25 +01:00
Tleety cd6967b310 Merge 2016-03-11 10:20:13 +01:00
FakeShemp 937bf823f3 Merge branch 'master' of github.com:teamfisk/TacticalZ 2016-03-10 21:59:23 +01:00
FakeShemp e35b09cc68 Add alpha clipping
Tobbe sa att jag fick pusha direkt
2016-03-10 21:59:01 +01:00
William Moberg b172526e62 Merge pull request #199 from teamfisk/CapturePointTake
The children of the CapturePointModels now also get their visibility changed
2016-03-10 16:37:53 +01:00
Tleety ab70aed840 WIP 2016-03-10 16:15:57 +01:00
verysecrethero 551745b0a6 Merge remote-tracking branch 'origin/master' into CapturePointTake 2016-03-10 16:14:18 +01:00
William Moberg d6e3a47182 Merge branch 'master' into Trigger 2016-03-10 16:14:17 +01:00
verysecrethero 8b89df0095 Changed to a better validator 2016-03-10 16:09:54 +01:00
William Moberg 038a706e28 Don't collide against disabled (invisible) models. Triggers uses model vs. box instead of only box vs. box. 2016-03-10 16:05:30 +01:00
Tleety f9808a61f7 Changed sprite text 2016-03-10 16:02:03 +01:00
Jocke a8a4b5d2a2 Disconnect on udp 2016-03-10 15:59:55 +01:00
Jace 777f382772 Merge branch 'master' of github.com:teamfisk/TacticalZ 2016-03-10 15:48:05 +01:00
Jace 78129cf432 Fixed picking depth values after depth buffer was changed to a texture. 2016-03-10 15:47:47 +01:00
Jace e734d0c953 Oops. 2016-03-10 15:47:32 +01:00
William Moberg c9fef65c4f Merge pull request #198 from teamfisk/Menu
Menu
2016-03-10 15:38:06 +01:00
Tleety 7e6288c597 Some merge fixes and some sprite fixes. 2016-03-10 15:36:33 +01:00
Tleety 4322a5d8da Some fixes for sprites 2016-03-10 15:21:11 +01:00
FakeShemp b094b9feca Merge branch 'master' of github.com:teamfisk/TacticalZ 2016-03-10 15:01:27 +01:00
Jocke 67dfbfff01 Fixed multiply connections 2016-03-10 14:44:06 +01:00
verysecrethero 0a94373f3f The children of the CapturePointModels now also get their visibility on/off. This is done since a capturepoint is actually 2 models and not just 1 2016-03-10 14:38:20 +01:00
Tleety 79d0ef4529 Changed default value of glow intensity 2016-03-10 14:01:45 +01:00
Jace dd63f4a1b4 Fixed FOV being used to calculate projection matrix being degrees when it should be radians, AGAIN. FOV angles are now correct! 2016-03-10 13:51:18 +01:00
Tleety 50dbbb4ed4 SSAO now send in 0 as Lod level and some optimizations in SSAO and Blur pass. 2016-03-10 13:47:16 +01:00
Tleety 329a15e08b Bloom bad edge clamp fixed 2016-03-10 13:42:33 +01:00
stiffly 28de31d84d FIX #196: Some variables had not been properly initialized and would cause the game to crash. 2016-03-10 13:28:38 +01:00
Jace e9ef0e7060 Disabled GLERROR macro for release builds 2016-03-10 13:19:26 +01:00
Jace 416f55b6ce Merge pull request #196 from teamfisk/RendererBugFixes
Fixed on window resize memory leak
2016-03-10 13:11:23 +01:00
Jace 0346f81234 Renderer resizing updated to send EResolutionChanged when the resolution is updated so cameras can update their aspect ratio and have a correct FOV. Renderer::SetResolution actually changes the resolution now too. 2016-03-10 13:09:34 +01:00
Tleety c3255519bf Blur is now looking like real blur 2016-03-10 13:07:41 +01:00
William Moberg bdcb33d992 Mouse always unlocked on game start and on disconnecting (i.e when menu shows). 2016-03-10 12:46:06 +01:00
Teejoon a6ef026db5 Fixed on window resize memory leak 2016-03-10 12:27:25 +01:00
Tleety a2244e87ad WIP, trying to get blur to work with mipmaps 2016-03-10 12:18:06 +01:00
Jocke a0d60160dd Increased size of socket buffer 2016-03-10 10:58:26 +01:00
Jocke 15c54d2be6 Merge remote-tracking branch 'origin/master' into SplitSnapshots 2016-03-10 10:52:51 +01:00
Viktor Ljung f26b24ef6b Merge pull request #195 from teamfisk/AnimationPickingFixes
Forgot one console spammer
2016-03-10 10:49:05 +01:00
viktorljung b0e9cd3965 Forgot one console spammer 2016-03-10 10:47:58 +01:00
stiffly e444a86ec5 Merge remote-tracking branch 'origin/master' into Kill-streak-sounds 2016-03-10 10:36:20 +01:00
Adam Byléhn 5e747f53db Merge pull request #194 from teamfisk/AnimationPickingFixes
Animation picking fixes
2016-03-10 10:33:29 +01:00
William Moberg 8a8c375d3a Merge remote-tracking branch 'origin/master' into BoxModelCollision 2016-03-10 09:57:33 +01:00
Tleety 592edf7dba Sprites can now be rendered with the texture ratio in mind 2016-03-09 23:31:54 +01:00
Jace 012420b4da Merge branch 'master' of github.com:teamfisk/TacticalZ 2016-03-09 23:07:44 +01:00
viktorljung 3a213be679 Picking on animated models fixed 2016-03-09 23:06:53 +01:00
Jace 50b0a091ec Fixed editor widgets to take scale of the entity into account when they're moved 2016-03-09 22:45:55 +01:00
viktorljung 4e6ff16e58 Shadows for animated models and removed spam in console 2016-03-09 22:43:04 +01:00
Tleety 087facc22e Textures are now able to keep their scale even though the sprite is scaled. 2016-03-09 22:22:32 +01:00
FakeShemp 981dc3467e Baggu fixed again
+Bonus document formatted
2016-03-09 22:11:17 +01:00
Jace 727b6ba871 Fixed Transform::AbsolutePosition to take scale into account properly maybe? 2016-03-09 22:04:13 +01:00
FakeShemp 42af029a26 fix baggu 2016-03-09 21:25:51 +01:00
Tleety f9935cad42 Merge branch 'master' into Menu 2016-03-09 21:07:40 +01:00
Jocke 37355b1afc Hot fix 2016-03-09 20:12:08 +01:00
Jace e11cdaa662 Removed forced player color on spawn 2016-03-09 20:11:07 +01:00
Tobias Dahl d393f9ade1 Merge pull request #180 from teamfisk/Shadows
Shadows
2016-03-09 19:55:41 +01:00
FakeShemp 2e5dfc609a support headshot icons 2016-03-09 19:51:57 +01:00
William Moberg 8936b3d6c3 Probably fixed all the jittering, won't need the jitter guard anymore. 2016-03-09 19:45:26 +01:00
Jocke ad49af2f8c Merge remote-tracking branch 'origin/master' into SplitSnapshots 2016-03-09 19:43:48 +01:00
Jocke 5a7034dfcd popped the right amount of the header 2016-03-09 19:43:18 +01:00
FakeShemp e25c9ee690 Merge remote-tracking branch 'origin/master' into Shadows
# Conflicts:
#	include/Engine/Rendering/DrawFinalPass.h
#	include/Engine/Rendering/Renderer.h
#	resources/Shaders/ForwardPlus.vert.glsl
#	resources/Shaders/ForwardPlusSkinned.vert.glsl
#	src/Engine/Rendering/Renderer.cpp
2016-03-09 19:38:55 +01:00
Jocke 9721cb6a7d Merge remote-tracking branch 'origin/master' into SplitSnapshots
# Conflicts:
#	include/Engine/Network/Client.h
#	src/Engine/Network/Client.cpp
2016-03-09 19:14:10 +01:00
Tleety 90b2c70215 Some sprite fixes 2016-03-09 19:12:06 +01:00
Jace fce6e90f3c First person assault weapon idle animation now correct 2016-03-09 19:07:02 +01:00
antc13 07d85bacf6 Added file extension to CP_Rocky2 & moved spawn points on the Y axis. 2016-03-09 18:57:45 +01:00
antc13 15c1b238ef Merge branch 'master' of https://github.com/teamfisk/TacticalZ 2016-03-09 18:46:43 +01:00
antc13 b8839551a4 Created the map CP_Rocky2 but beware, it's still WIP. 2016-03-09 18:46:26 +01:00
Jocke c36c7d1ea6 Merge remote-tracking branch 'origin/master' into SplitSnapshots
# Conflicts:
#	src/Engine/Network/Server.cpp
2016-03-09 18:41:01 +01:00
Jace ce58fac6ba Merge pull request #192 from teamfisk/Movement
Movement
2016-03-09 18:37:56 +01:00
viktorljung 1bfd0cce5e Idel 2016-03-09 18:36:53 +01:00
viktorljung 60ff53112e Merge remote-tracking branch 'origin/master' into Movement 2016-03-09 18:27:36 +01:00
viktorljung d42d886dcc 3rd person animations synced with 1st person animations 2016-03-09 18:27:09 +01:00
Jocke 3209e36176 We can now send more data with UDP than previously, the splitting seems to work fine but receiving has some problems. 2016-03-09 18:26:33 +01:00
William Moberg 8a3564ad49 Merge remote-tracking branch 'origin/master' into BoxModelCollision 2016-03-09 18:03:39 +01:00
Jace 1f14087734 Merge branch 'master' of github.com:teamfisk/TacticalZ 2016-03-09 18:02:11 +01:00
Jace 0b58f32f32 Fixed third person animations over network 2016-03-09 18:01:32 +01:00
Tobias Dahl 48d9463bd3 Merge pull request #190 from teamfisk/RendererBugFixes
Renderer bug fixes
2016-03-09 18:01:02 +01:00
William Moberg 9581e9ac84 Don't set the player to previous position when uncrouching. 2016-03-09 17:51:26 +01:00
Teejoon 974d9101bd Merge remote-tracking branch 'origin/master' into RendererBugFixes
Conflicts:
	assets
2016-03-09 17:50:42 +01:00
Tobias Dahl 07cb025de3 Merge pull request #188 from teamfisk/FriendlyHost/Join
User friendly server join
2016-03-09 17:49:39 +01:00
stiffly fdc37a9fe9 Loads the correct menu 2016-03-09 17:49:04 +01:00
stiffly 99ccca6273 Merge remote-tracking branch 'origin/master' into FriendlyHost/Join 2016-03-09 17:38:37 +01:00
Adam Byléhn e9717c68bd Merge pull request #191 from teamfisk/Menu
Menu
2016-03-09 17:38:18 +01:00
Tleety d093284569 Rename variable 2016-03-09 17:37:40 +01:00
Teejoon 85e63acda0 removed standarduniforms 2016-03-09 17:36:30 +01:00
Tleety 7e7d98eaae Merge remote-tracking branch 'origin/master' into Menu 2016-03-09 17:24:41 +01:00
Tleety 1104166039 TextureSprite Resource that use GL_NEAREST for sampling aswell as some StartMenu changes 2016-03-09 17:24:21 +01:00
Teejoon fad93ca5aa Merge remote-tracking branch 'origin/master' into RendererBugFixes
Conflicts:
	include/Engine/Rendering/DrawFinalPass.h
2016-03-09 16:54:26 +01:00
Teejoon 91cad561a4 Some more optimization and fixed sorting of render job objects in RenderSystem 2016-03-09 16:51:24 +01:00
Jace 3ea1177425 Merge pull request #189 from teamfisk/Weapons
Basically complete Assault Weapon
2016-03-09 16:17:00 +01:00
viktorljung 7141756992 Merge remote-tracking branch 'origin/Weapons' into Movement
# Conflicts:
#	resources/Schema/Entities/Player.xml
#	resources/Schema/Entities/PlayerAssaultBlue.xml
#	resources/Schema/Entities/PlayerAssaultFallbackBlue.xml
#	resources/Schema/Entities/PlayerAssaultFallbackRed.xml
#	resources/Schema/Entities/PlayerAssaultRed.xml
#	resources/Schema/Entities/aaaatestremoveme.xml
#	resources/Schema/Entities/aim_rays.xml
2016-03-09 15:59:36 +01:00
viktorljung de125663fd Merge remote-tracking branch 'origin/master' into Movement
# Conflicts:
#	assets
#	resources/Schema/Entities/Player.xml
#	resources/Schema/Entities/PlayerAssaultFallbackBlue.xml
#	resources/Schema/Entities/PlayerAssaultFallbackRed.xml
#	resources/Schema/Entities/PlayerAssaultRed.xml
#	resources/Schema/Entities/aaaatestremoveme.xml
#	resources/Schema/Entities/aim_rays.xml
#	src/Engine/Rendering/BoneAttachmentSystem.cpp
2016-03-09 15:54:00 +01:00
Jace 34e551663f Merge remote-tracking branch 'origin/master' into Weapons
# Conflicts:
#	assets
#	resources/Schema/Entities/Player.xml
#	resources/Schema/Entities/PlayerAssaultFallbackBlue.xml
#	resources/Schema/Entities/PlayerAssaultFallbackRed.xml
#	resources/Schema/Entities/PlayerAssaultRed.xml
#	resources/Schema/Entities/aaaatestremoveme.xml
#	resources/Schema/Entities/aim_rays.xml
2016-03-09 15:52:13 +01:00
stiffly fa0b52caec When you disconnect you will delete the world and return to the menu. 2016-03-09 15:49:42 +01:00
Jace 9d368348d5 Updated 3rd person and 1st person animation trees for assault to allow for third person weapon animations 2016-03-09 15:48:57 +01:00
Tleety 49040e9c4b StartMenu system now sets the main menu camera to active as long as it exists. 2016-03-09 15:29:42 +01:00
Tleety a76a04260f StartSystem skeleton and some changes to the StartMenu 2016-03-09 15:10:54 +01:00
stiffly 1211888ce1 The world is deleted upon connection to a server. 2016-03-09 15:10:32 +01:00
stiffly 877defdfee Merge remote-tracking branch 'origin/master' into FriendlyHost/Join 2016-03-09 14:47:24 +01:00
stiffly 6f69b52358 Merge remote-tracking branch 'origin/Menu' into FriendlyHost/Join 2016-03-09 14:34:41 +01:00
Tleety 500ebfa08c Menu should now show the correct server IP instead of default.
Start of a StartMenu entity that will show when the game is started.
2016-03-09 14:34:02 +01:00
stiffly 09171a1a18 WIP connect from menu 2016-03-09 14:33:20 +01:00
Jace ee4db3c12f Merge pull request #187 from teamfisk/BoneAttachmentFix
Inverse seems to be the same as -w
2016-03-09 14:32:27 +01:00
viktorljung ddde50b690 Inverse seems to be the same as -w 2016-03-09 14:27:50 +01:00
Jace 4c184b8f44 Merge pull request #186 from teamfisk/BoneAttachmentFix
BoneAttachments now working perfectly
2016-03-09 13:51:51 +01:00
viktorljung 555b19c41d BoneAttachments now working perfectly 2016-03-09 13:49:28 +01:00
William Moberg 4ae39dcc36 Merge pull request #182 from teamfisk/DamageIndicator
Friendly fire gives no DamageIndicator
2016-03-09 13:26:57 +01:00
stiffly 67ccb5bee5 Merge remote-tracking branch 'origin/master' into FriendlyHost/Join 2016-03-09 13:23:31 +01:00
viktorljung 70ec075887 3rd person aim improvements 2016-03-09 13:19:56 +01:00
FakeShemp ba6d2b758d Add killstreak icon 2016-03-09 12:34:09 +01:00
Adam Byléhn 31ed606ef9 Merge pull request #183 from teamfisk/Menu
Menu
2016-03-09 12:33:36 +01:00
Tleety c9c462f695 The console now print some info when you are trying to connect to server 2016-03-09 12:31:37 +01:00
FakeShemp 12dd1d21de Text now handles color, alpha and icon parsing 2016-03-09 12:11:26 +01:00
Tleety 704242597a Merge remote-tracking branch 'origin/master' into Menu
# Conflicts:
#	resources/Schema/Components.xsd
#	resources/Schema/Entities/NewMapWSpectatorCam.xml
#	resources/Schema/Types/Entity.xsd
#	src/Game/Game.cpp
2016-03-09 11:49:42 +01:00
Tobias Dahl 00478b4f12 Merge pull request #184 from teamfisk/TeamPickCamera
Tiny compiler bug fix.
2016-03-09 11:46:30 +01:00
William Moberg f24a5a36b4 Tiny compiler bug fix. 2016-03-09 11:44:07 +01:00
Tobias Dahl 697da620d3 Merge pull request #179 from teamfisk/TeamPickCamera
Spectator camera system
2016-03-09 11:41:05 +01:00
William Moberg 534d6639e5 Class enum instead of hardcoded ints.
Removed superfluous .Valid() checks.

Check for spectator spawnrequest in case they somehow has a class, so we don't get "x players were supposed to be spawned but failed" if it happens.
2016-03-09 11:35:32 +01:00
William Moberg b782e73556 Falsified DepthSort for SpectatorCamera buttons and CP-HUD elements. 2016-03-09 10:56:05 +01:00
verysecrethero 6456df8ce1 DamageIndicator is now disabled for Friendly fire 2016-03-09 10:44:08 +01:00
stiffly c1f38a71ba Merge remote-tracking branch 'origin/master' into FriendlyHost/Join 2016-03-09 10:12:57 +01:00
stiffly d7c30450dc Should now read servername from config. 2016-03-09 10:08:23 +01:00
Tobias Dahl 30e1c2c247 Merge pull request #178 from teamfisk/NetworkComponent
Network component
2016-03-09 10:04:40 +01:00
stiffly 4abe73eae7 Merge remote-tracking branch 'origin/master' into FriendlyHost/Join 2016-03-09 10:00:44 +01:00
stiffly e0de91cce3 WIP 2016-03-09 09:57:32 +01:00
Tleety 95f68cc888 ConnectRequest event and some other shit 2016-03-08 22:24:32 +01:00
William Moberg 6c673db2f4 Merge branch 'TeamPickCamera' of github.com:teamfisk/TacticalZ into TeamPickCamera 2016-03-08 19:24:55 +01:00
William Moberg 7bc3c9f7b1 Don't force to spectator camera if player presses pickTeam/Class prematurely. Players team should be remembered after picked, spawn request is not erased anymore. 2016-03-08 18:26:17 +01:00
Tleety 3394d65055 Servers now show up in the server list. 2016-03-08 18:13:21 +01:00
verysecrethero 7ee4ea637b Merge remote-tracking branch 'origin/master' into TeamPickCamera 2016-03-08 17:30:22 +01:00
FakeShemp 7ced9e6767 Merge branch 'master' of github.com:teamfisk/TacticalZ 2016-03-08 17:25:03 +01:00
William Moberg e5dba6604b Merge pull request #181 from teamfisk/AmmoPickup
AmmoPickupSystem should now be able to give ammo to all classtypes
2016-03-08 17:09:37 +01:00
Tleety 280de0e984 Merge remote-tracking branch 'origin/FriendlyHost/Join' into Menu
# Conflicts:
#	include/Game/Systems/MainMenuSystem.h
#	src/Engine/GUI/MainMenuSystem.cpp
2016-03-08 17:03:50 +01:00
stiffly 17e2ebeaa7 Merge remote-tracking branch 'origin/master' into FriendlyHost/Join
# Conflicts:
#	include/Engine/Network/Client.h
2016-03-08 16:59:24 +01:00
Tleety 1d8b5abfde Fuck aff 2016-03-08 16:53:35 +01:00
Tleety ba9208085b WIP 2016-03-08 16:52:56 +01:00
Teejoon d51bea798a Merge remote-tracking branch 'origin/Render_Optimization' into RendererBugFixes 2016-03-08 16:20:23 +01:00
Teejoon 155d700a44 WIP 2016-03-08 16:19:56 +01:00
Tleety f8ab52c72c WIP 2016-03-08 16:15:54 +01:00
verysecrethero e43a7be7db DamageIndicatorSystem now works for singleplayer again. Friendly fire DamageIndicator is now black color. 2016-03-08 15:55:51 +01:00
Jocke 3828616b60 Made it easier to maintain changes in packet header, prepared for reliable UDP packets. 2016-03-08 14:44:35 +01:00
viktorljung f934f972e8 Merge remote-tracking branch 'origin/Weapons' into Movement
# Conflicts:
#	resources/Schema/Entities/PlayerDefenderBlue.xml
2016-03-08 14:34:21 +01:00
viktorljung 8d1877321a Fixed BoneAttachment offset rotation 2016-03-08 14:32:50 +01:00
Tleety a0ca4df3be Some server list components and entities. 2016-03-08 13:29:21 +01:00
viktorljung f77a610519 Dash now looking good 2016-03-08 13:26:01 +01:00
William Moberg d7f09b1a8f Added clickable buttons to switch to class/team screens, as a better alternative to Comma/Period on the keyboard. 2016-03-08 11:59:15 +01:00
Jocke 9cbc582be2 Kinda works like before 2016-03-08 11:29:47 +01:00
viktorljung 2ba245368b Improved movement animaitons
Added a SetBlendWeight event that sets the weight for all nodes with a name.
2016-03-08 11:21:40 +01:00
Teejoon 82a7ff2ec3 Merge remote-tracking branch 'origin/master' into RendererBugFixes 2016-03-08 11:18:25 +01:00
Teejoon e902110d4b Commiting the files since they didn't get commited 2016-03-08 11:16:56 +01:00
Teejoon 13aa476656 Sets most texture to 0 when variable is initialized 2016-03-08 11:16:20 +01:00
Tleety 01f29b6d4e Blur behind buttons/sprites should now be working as intended. 2016-03-08 11:14:09 +01:00
stiffly ec3ed1f46f Merge remote-tracking branch 'origin/master' into Kill-streak-sounds
# Conflicts:
#	include/Game/Systems/Weapon/DefenderWeaponBehaviour.h
2016-03-08 10:39:52 +01:00
Tleety 6b7f598c4d WIP 2016-03-07 23:35:58 +01:00
Tleety 5c0d9070c7 WIP 2016-03-07 23:25:06 +01:00
Jace 77b9112f55 Since I overwrote the assets I was sent with a now reverted commit, Defender weapon reload animations won't work until it's exported properly 2016-03-07 20:04:22 +01:00
Jace 7b0f887332 fixup! fixup! Disabled InputCommand processing while you fiddle with editor UI elements 2016-03-07 19:59:57 +01:00
FakeShemp e494f6a495 Merge branch 'master' into Shadows 2016-03-07 19:46:04 +01:00
FakeShemp 2049d630e9 Revert "Revert "Shadows""
This reverts commit 73b8bff1f3.
2016-03-07 19:45:46 +01:00
Jace 3fda25b604 Working first person animations for AssaultWeapon and DefenderWeapon and reload effect for AssaultWeapon 2016-03-07 19:38:49 +01:00
Jace 67ce6c5ae6 Added Speed and Delay fields to explosion effect. 2016-03-07 19:38:02 +01:00
Jace 1a403b9b88 TextFieldReader now loops through parents if the entity field was empty and the current entity didn't have a component of that type. 2016-03-07 17:55:00 +01:00
Jace f923872e51 fixup! Disabled InputCommand processing while you fiddle with editor UI elements 2016-03-07 17:54:01 +01:00
Jace abc447b937 Updated snapshot filter to ignore the new animation components 2016-03-07 17:53:47 +01:00
Jace 8bcb15a128 Disabled InputCommand processing while you fiddle with editor UI elements 2016-03-07 17:53:32 +01:00
Jace b000bb2597 Cleaned up old entities 2016-03-07 17:53:11 +01:00
Teejoon fd994ca93d Deleting texture thats getting rended too. 2016-03-07 17:52:47 +01:00
William Moberg fcf87104c3 Replaced test textures for class picking with more proper icons. 2016-03-07 17:50:03 +01:00
William Moberg 1516ed8e2d Removed debug logging. PlayerID in InputCommands from buttons is corrected. 2016-03-07 17:35:01 +01:00
stiffly 9e8df340b3 Merge remote-tracking branch 'origin/master' into NetworkComponent
# Conflicts:
#	src/Engine/Network/Server.cpp
2016-03-07 17:21:24 +01:00
stiffly b629ed5e2b Updated some known xml entities that should be send in snapshots. 2016-03-07 17:15:56 +01:00
stiffly f00fb836fb Oops. 2016-03-07 17:10:13 +01:00
stiffly 13c3bcb290 Now only entities with NetworkComponent will be send in Snapshots. 2016-03-07 16:52:51 +01:00
Tleety 7de95d4cb5 Mainmenu entity 2016-03-07 16:34:56 +01:00
stiffly f585f9ada9 Created the NetworkComponent xml file 2016-03-07 16:11:19 +01:00
Jocke 68a88ed756 We are now using udp again 2016-03-07 16:07:54 +01:00
William Moberg 962521fa59 Merge branch 'master' into TeamPickCamera
# Conflicts:
#	src/Game/Systems/PlayerDeathSystem.cpp
2016-03-07 15:20:46 +01:00
William Moberg 282e0bf7c4 Only set spectator camera if player haven't spawned already. Don't spawn player if they switch to class pick screen. 2016-03-07 15:05:37 +01:00
stiffly 9cc8124847 Renamed IsAnyParentMissingTransform -> isAnyParentMissingTransform (member function). 2016-03-07 14:34:45 +01:00
Jocke 078d6eb712 Added sequnceNumber and totalNumberOfPackets to packet for packet splitting. 2016-03-07 14:22:09 +01:00
stiffly a369c26a28 Blend tree nodes can now exist without transform components, without the game crashing. 2016-03-07 14:19:22 +01:00
Teejoon b38ebbe676 Shadows now working on NVIDIA cards too 2016-03-07 14:00:08 +01:00
William Moberg 0dfe00b406 Unlocks mouse when changing to SpectatorCamera and locking when respawning. 2016-03-04 09:49:27 +01:00
William Moberg 7a2f1ac9fd Merge branch 'Weapons' into TeamPickCamera 2016-03-04 08:34:27 +01:00
William Moberg 03843774d7 Moved buttons and fixed so you can't spawn with no class. 2016-03-04 07:01:47 +01:00
William Moberg 2ecc53ecca Merge branch 'master' into TeamPickCamera
# Conflicts:
#	src/Game/Game.cpp
2016-03-04 05:58:49 +01:00
William Moberg 06614aa907 SpectatorCameraSystem handles the overwatch cameras. Set camera to a class pick screen when connecting. Cannot spawn until both team and class has been picked.
Preparations for class aware PlayerSpawnSystem.
2016-03-04 05:41:29 +01:00
stiffly 16124b7aa7 Crash fix 2016-03-04 03:31:51 +01:00
stiffly a7c57da2c9 WIP 2016-03-04 03:03:38 +01:00
stiffly 1227a795d7 WIP 2016-03-03 21:23:53 +01:00
stiffly 1cc92f4800 Merge remote-tracking branch 'origin/master' into Kill-streak-sounds 2016-03-03 20:25:43 +01:00
stiffly 3613d66d32 The EPlaySoundOnEntity event now has support to set the gain on the sound. It now also uses EntityWrapper instead of EntityID. 2016-03-03 20:24:48 +01:00
stiffly 20c6caa408 Merge remote-tracking branch 'origin/master' into Kill-streak-sounds
# Conflicts:
#	resources/DefaultConfig.ini
2016-03-03 17:32:04 +01:00
FakeShemp 315eac1af9 try not to assume things. 2016-03-03 15:10:27 +01:00
FakeShemp 4ee52b74bf Fix broken shader in. 2016-03-03 15:04:10 +01:00
FakeShemp d2f47e754f Remove shitty commented out thingie causing an error 2016-03-03 14:46:01 +01:00
FakeShemp a0f2f2bf5f Merge remote-tracking branch 'origin/master' into Shadows 2016-03-03 03:30:01 +01:00
stiffly b7fac7103d More reasonable distance to hear sounds by other players. Modeified by rolloff factor. 2016-03-02 11:26:06 +01:00
stiffly d3ffb9768b Sets velocity to 0, does not make use of doppler effect atm 2016-03-01 14:48:07 +01:00
stiffly 2c56b03b2b Merge remote-tracking branch 'origin/master' into Kill-streak-sounds 2016-02-29 16:41:46 +01:00
stiffly 4fd578c764 Removed logic that's no longer needed. 2016-02-29 16:26:09 +01:00
Tleety b1a59e0ed2 Includes now use the key #include. Fixed a bug where it would crash if the file is not found. Fixed a bug where null terminators where included from the included file, causing it to stop reading after the first included file. 2016-02-26 17:46:18 +01:00
stiffly 67dffafe5a Drumloop will now play when a team is about to win 2016-02-26 16:44:08 +01:00
Tleety b3038ef713 Includes are now supported in shader with the key #GLSL 2016-02-26 16:33:55 +01:00
stiffly 7dbb9e452b Added a announcer volume channel. 2016-02-24 15:08:39 +01:00
stiffly cf3d1b5b00 Changed the default reference distance for emitters. Should be heard all over the map 2016-02-24 14:19:38 +01:00
stiffly 9783f9c650 Added an event to change the background music. 2016-02-24 14:18:42 +01:00
stiffly f72dea3852 Added a system that will handle BGM. Created specific logic for sounds to loop like Petter wants. 2016-02-24 11:51:06 +01:00
stiffly 8a04e87494 The serverlist is displayed when pressing connect button. 2016-02-23 14:31:35 +01:00
231 changed files with 62087 additions and 9299 deletions
+1 -1
Submodule assets updated: 52ea74c5d5...bc6e7df04c
+12
View File
@@ -84,6 +84,18 @@ bool AABBvsTriangles(const AABB& box,
const std::vector<unsigned int>& modelIndices,
const glm::mat4& modelMatrix);
enum Output
{
OutContained,
OutSeparated,
OutIntersecting
};
//Detects intersection and containment.
Output AABBvsTrianglesWContainment(const AABB& box,
const RawModel::Vertex* modelVertices,
const std::vector<unsigned int>& modelIndices,
const glm::mat4& modelMatrix);
//Return true if the boxes are intersecting.
bool AABBVsAABB(const AABB& a, const AABB& b);
//Return true if the boxes are intersecting.
+1 -1
View File
@@ -23,7 +23,7 @@ struct EntityWrapper
static const EntityWrapper Invalid;
const std::string Name();
const std::string Name() const;
bool HasComponent(const std::string& componentType);
void AttachComponent(const char* componentName);
EntityWrapper Parent();
+1
View File
@@ -47,6 +47,7 @@ private:
// Utility functions
EntityWrapper importEntity(EntityWrapper parent, boost::filesystem::path filePath);
void setWidgetMode(EditorGUI::WidgetMode mode);
bool isAnyParentMissingTransform(EntityID entityID);
// GUI callbacks
void OnEntitySelected(EntityWrapper entity);
+112 -46
View File
@@ -7,6 +7,7 @@
#include "../Game/Events/EDashAbility.h"
#include "InputHandler.h"
#include "Rendering/EAutoAnimationBlend.h"
#include "Rendering/ESetBlendWeight.h"
template <typename EventContext>
class FirstPersonInputController : public InputController<EventContext>
@@ -18,6 +19,7 @@ public:
virtual const glm::vec3 Rotation() const { return m_Rotation; }
virtual bool Jumping() const { return m_Jumping; }
virtual bool Crouching() const { return m_Crouching; }
virtual bool CrouchingLastFrame() const { return m_CrouchingLastFrame; }
virtual bool DoubleJumping() const { return m_DoubleJumping; }
virtual void SetDoubleJumping(bool isDoubleJumping) {
m_DoubleJumping = isDoubleJumping;
@@ -43,9 +45,9 @@ protected:
bool m_Jumping = false;
bool m_DoubleJumping = false;
bool m_Crouching = false;
bool m_CrouchingLastFrame = false;
//assault dash membervariables - needed to calculate the doubletap- and dashlogic
double m_AssaultDashDoubleTapDeltaTime = 0.0;
double m_DashEffectResetTimer = 0.0;
//i will let m_AssaultDashDoubleTapSensitivityTimer stay hardcoded, its not really a gamevariable (more an inputvariable),
//and its very unlikely that someone wants to change that value
const float m_AssaultDashDoubleTapSensitivityTimer = 0.25f;
@@ -82,6 +84,7 @@ void FirstPersonInputController<EventContext>::Reset()
{
m_Rotation = glm::vec3(0.f, 0.f, 0.f);
m_Jumping = false;
m_CrouchingLastFrame = m_Crouching;
}
template <typename EventContext>
@@ -110,7 +113,6 @@ bool FirstPersonInputController<EventContext>::OnCommand(const Events::InputComm
if (e.Command == "Pitch") {
float val = glm::radians(e.Value);
m_Rotation.x += -val;
//m_Rotation.x = glm::clamp(m_Rotation.x, -glm::half_pi<float>(), glm::half_pi<float>());
}
if (e.Command == "Yaw") {
@@ -123,22 +125,11 @@ bool FirstPersonInputController<EventContext>::OnCommand(const Events::InputComm
float val = glm::clamp(e.Value, -1.f, 1.f);
m_Movement.z = -val;
//Animation
if (m_PlayerEntity.Valid()) {
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
if (playerModel.Valid()) {
if (val > 0) {
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.1;
if(m_Crouching) {
aeb.NodeName = "Walk";
} else {
aeb.NodeName = "Run";
}
aeb.RootNode = playerModel;
aeb.Start = true;
m_EventBroker->Publish(aeb);
} else if (val < 0) {
if (val > 0) { // Walk/Run
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.1;
if (m_Crouching) {
@@ -148,10 +139,46 @@ bool FirstPersonInputController<EventContext>::OnCommand(const Events::InputComm
}
aeb.RootNode = playerModel;
aeb.Start = true;
aeb.SingleLevelBlend = true;
m_EventBroker->Publish(aeb);
} else if (val < 0) { // Walk/run Backwards
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.1;
if (m_Crouching) {
aeb.NodeName = "Walk";
} else {
aeb.NodeName = "Run";
}
aeb.RootNode = playerModel;
aeb.Start = true;
aeb.SingleLevelBlend = true;
aeb.Reverse = true;
m_EventBroker->Publish(aeb);
} else {
}
}
EntityWrapper firstPersonModel = m_PlayerEntity.FirstChildByName("Hands");
if (firstPersonModel.Valid()) {
if (val > 0) { // Walk/Run
if (!m_Crouching) {
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.1;
aeb.NodeName = "Run";
aeb.RootNode = firstPersonModel;
aeb.Start = true;
m_EventBroker->Publish(aeb);
}
} else if (val < 0) { // Walk/run Backwards
if (!m_Crouching) {
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.1;
aeb.NodeName = "Run";
aeb.RootNode = firstPersonModel;
aeb.Start = true;
aeb.Reverse = true;
m_EventBroker->Publish(aeb);
}
}
}
}
@@ -160,49 +187,92 @@ bool FirstPersonInputController<EventContext>::OnCommand(const Events::InputComm
float val = glm::clamp(e.Value, -1.f, 1.f);
m_Movement.x = val;
//Animation
if (m_PlayerEntity.Valid()) {
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
if (playerModel.Valid()) {
if (playerModel.Valid()) { //Right Strafe
if (val > 0) {
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.1;
aeb.NodeName = "Right";
aeb.RootNode = playerModel;
aeb.SingleLevelBlend = true;
aeb.Start = true;
m_EventBroker->Publish(aeb);
} else if (val < 0) {
} else if (val < 0) { //LeftStrafe
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.1;
aeb.NodeName = "Left";
aeb.RootNode = playerModel;
aeb.SingleLevelBlend = true;
aeb.Start = true;
m_EventBroker->Publish(aeb);
} else {
}
}
}
}
if (glm::length2(m_Movement) > 0) {
m_Movement = glm::normalize(m_Movement);
} else {
if (m_PlayerEntity.Valid()) {
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
if (playerModel.Valid()) {
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.1;
aeb.NodeName = "Idle";
aeb.RootNode = playerModel;
m_EventBroker->Publish(aeb);
}
}
}
}
//Animation
if (glm::length2(m_Movement) < 0.25f) {
//Blend to Idle
if (m_PlayerEntity.Valid()) {
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
if (playerModel.Valid()) {
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.1;
aeb.NodeName = "Idle";
aeb.RootNode = playerModel;
aeb.Start = true;
m_EventBroker->Publish(aeb);
}
EntityWrapper firstPersonModel = m_PlayerEntity.FirstChildByName("Hands");
if (firstPersonModel.Valid()) {
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.1;
aeb.NodeName = "Idle";
aeb.RootNode = firstPersonModel;
aeb.Start = true;
m_EventBroker->Publish(aeb);
}
}
} else {
//Blend to movement
if (m_PlayerEntity.Valid()) {
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
if (playerModel.Valid()) {
Events::AutoAnimationBlend aeb;
aeb.Duration = 0.1;
aeb.NodeName = "DirectionBlend";
aeb.RootNode = playerModel;
m_EventBroker->Publish(aeb);
}
}
}
if (glm::length2(m_Movement) > 0) {
m_Movement = glm::normalize(m_Movement);
//Animation
// movement direction blend
if (m_PlayerEntity.Valid()) {
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
if (playerModel.Valid()) {
glm::vec2 direction = glm::normalize(glm::vec2(m_Movement.x, m_Movement.z));
double weight = glm::abs(glm::dot(glm::vec2(1, 0), direction));
Events::SetBlendWeight sbw;
sbw.NodeName = "DirectionBlend";
sbw.Weight = weight;
sbw.RootNode = playerModel;
m_EventBroker->Publish(sbw);
}
}
}
if (e.Command == "Forward" || e.Command == "Right") {
if (e.Value != 0) {
m_CurrentDirectionVector = e.Command == "Right" ? (e.Value > 0 ? "Right" : "Left") : (e.Value > 0 ? "Forward" : "Backward");
@@ -235,6 +305,8 @@ bool FirstPersonInputController<EventContext>::OnCommand(const Events::InputComm
if (e.Command == "Crouch") {
m_Crouching = e.Value > 0;
//Animation
if (m_PlayerEntity.Valid()) {
EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel");
if (playerModel.Valid()) {
@@ -288,17 +360,10 @@ bool FirstPersonInputController<EventContext>::OnLockMouse(const Events::LockMou
template <typename EventContext>
void FirstPersonInputController<EventContext>::AssaultDashCheck(double dt, bool isJumping, double assaultDashCoolDownMaxTimer, double& assaultDashCoolDownTimer, EntityID playerID) {
m_AssaultDashDoubleTapDeltaTime += dt;
m_DashEffectResetTimer += dt;
assaultDashCoolDownTimer -= dt;
//cooldown = assaultDashCoolDownMaxTimer sec, pretend the dash lasts 0.25 sec (for friction to do its work)
if (assaultDashCoolDownTimer > (assaultDashCoolDownMaxTimer - 0.25f)) {
m_PlayerIsDashing = true;
if (m_DashEffectResetTimer > 0.05) {
Events::DashAbility e;
e.Player = playerID;
m_EventBroker->Publish(e);
m_DashEffectResetTimer = 0.0;
}
} else {
m_PlayerIsDashing = false;
}
@@ -310,6 +375,7 @@ void FirstPersonInputController<EventContext>::AssaultDashCheck(double dt, bool
assaultDashCoolDownTimer = assaultDashCoolDownMaxTimer;
m_AssaultDashDoubleTapped = true;
m_AssaultDashDoubleTapDeltaTime = 0.f;
Events::DashAbility e;
e.Player = playerID;
m_EventBroker->Publish(e);
+1 -1
View File
@@ -18,7 +18,7 @@ public:
void LoadBindings(std::string file);
void Update(double dt);
void Process();
void Process(bool suppressNewEvents = false);
template <typename T>
void AddHandler();
void Publish(const Events::InputCommand& e);
+10 -16
View File
@@ -17,6 +17,7 @@
#include "Network/TCPClient.h"
#include "Network/SnapshotDefinitions.h"
#include "Core/World.h"
#include "Core/EntityFile.h"
#include "Core/EventBroker.h"
#include "Core/ConfigFile.h"
#include "Core/EPlayerDeath.h"
@@ -29,19 +30,8 @@
#include "Core/EAmmoPickup.h"
#include "Network/ESearchForServers.h"
#include "../Game/Events/EDashAbility.h"
struct ServerInfo
{
ServerInfo(std::string a, int b, std::string c, int d)
{
Address = a; Port = b; Name = c; PlayersConnected = d;
}
std::string Address = "";
int Port = 0;
std::string Name = "";
int PlayersConnected = 0;
};
#include "Network/EDisplayServerlist.h"
#include "Network/EConnectRequest.h"
class Client : public Network
{
public:
@@ -52,7 +42,7 @@ public:
void Connect(std::string address, int port);
void Update() override;
private:
//UDPClient m_Unreliable;
UDPClient m_Unreliable;
TCPClient m_Reliable;
std::vector<Events::PlayerSpawned> m_PlayerSpawnEvents;
void parseSpawnEvents();
@@ -91,7 +81,7 @@ private:
std::vector<Events::InputCommand> m_InputCommandBuffer;
// Private member functions
size_t receive(char* data);
size_t receive(char* data);
void disconnect();
void parseMessageType(Packet& packet);
void updateFields(Packet& packet, const ComponentInfo& componentInfo, const EntityID& entityID);
@@ -119,6 +109,8 @@ private:
void sendLocalPlayerTransform();
void becomePlayer();
void displayServerlist();
void removeWorld();
void createMainMenu();
// Mapping Logic
// Returns if local EntityID exist in map
bool clientServerMapsHasEntity(EntityID clientEntityID);
@@ -139,13 +131,15 @@ private:
bool OnDoubleJump(Events::DoubleJump & e);
EventRelay<Client, Events::DashAbility> m_EDashAbility;
bool OnDashAbility(const Events::DashAbility& e);
EventRelay<Client, Events::ConnectRequest> m_EConnectRequest;
bool OnConnectRequest(const Events::ConnectRequest& e);
bool OnSearchForServers(const Events::SearchForServers& e);
UDPClient m_ServerlistRequest;
std::vector<ServerInfo> m_Serverlist;
bool m_SearchingForServers = false;
std::clock_t m_StartSearchTime;
double m_SearchingTime = 2000; // Config I guess
double m_SearchingTime = 200; // Config I guess
};
#endif
+17
View File
@@ -0,0 +1,17 @@
#ifndef Events_ConnectRequest_h__
#define Events_ConnectRequest_h__
#include "Core/EventBroker.h"
namespace Events
{
struct ConnectRequest : public Event
{
std::string IP = "";
int Port = 0;
};
}
#endif
@@ -0,0 +1,29 @@
#ifndef Events_DisplayServerlist_h__
#define Events_DisplayServerlist_h__
#include <string>
#include <vector>
#include "Core/Event.h"
struct ServerInfo
{
ServerInfo(std::string address, int port, std::string name, int players)
{
Address = address; Port = port; Name = name; PlayersConnected = players;
}
std::string Address = "";
int Port = 0;
std::string Name = "";
int PlayersConnected = 0;
};
namespace Events
{
struct DisplayServerlist : public Event
{
std::vector<ServerInfo> Serverlist;
};
}
#endif
+1
View File
@@ -39,6 +39,7 @@ protected:
void logReceivedData(int bytesReceived);
void saveToFile();
void updateNetworkData();
void popNetworkSegmentOfHeader(Packet& packet);
};
#endif
+1 -1
View File
@@ -11,7 +11,7 @@ class NetworkClient
public:
NetworkClient();
virtual ~NetworkClient();
virtual void Connect(std::string playerName, std::string address, int port) = 0;
virtual bool Connect(std::string playerName, std::string address, int port) = 0;
virtual void Disconnect() = 0;
virtual void Receive(Packet& packet) = 0;
virtual void Send(Packet & packet) = 0;
+19 -3
View File
@@ -16,7 +16,9 @@ public:
Packet(char* data, const size_t sizeOfPacket);
Packet(MessageType type);
~Packet();
void Init(MessageType type, unsigned int& packetID);
void Init(MessageType type, unsigned int& packetID,
int groupIndex, int groupSize,
int packetGroup);
// Add primitive types like int, float, char...
template<typename T>
@@ -25,7 +27,8 @@ public:
// Check if we are trying to add more than the package can fit.
if (m_MaxPacketSize < m_Offset + sizeof(T)) {
if (m_MaxPacketSize >= 32000) {
LOG_WARNING("Package::WritePrimitive(): New size is huge %i bytes\n", m_MaxPacketSize*2);
// This will spam couse 8 players are over 100 000 bytes
//LOG_WARNING("Package::WritePrimitive(): New size is huge %i bytes\n", m_MaxPacketSize*2);
}
resizeData();
}
@@ -57,13 +60,19 @@ public:
void UpdateSize();
char* ReadData(int SizeOfData);
void ChangePacketID(unsigned int& packetID);
void ChangeGroupIndex(int groupIndex);
void ChangeGroupSize(int groupSize);
void ChangeGroup(int group);
size_t Size() { return m_Offset; };
char* Data() { return m_Data; };
MessageType GetMessageType();
size_t Group();
size_t DataReadSize() { return m_ReturnDataOffset; }
size_t MaxSize() { return m_MaxPacketSize; }
size_t HeaderSize() { return m_HeaderSize; }
size_t GroupIndex();
size_t GroupSize();
size_t PacketID();
private:
char* m_Data;
size_t m_ReturnDataOffset = 0;
@@ -72,6 +81,13 @@ private:
size_t m_HeaderSize = 0;
void resizeData();
void resizeData(int size);
size_t packetSizeOffset = 0;
size_t groupOffset = 0;
size_t groupIndexOffset = 0;
size_t groupSizeOffset = 0;
size_t messageTypeOffset = 0;
size_t packetIDOffset = 0;
};
#endif
@@ -14,6 +14,7 @@ struct PlayerDefinition {
unsigned short TCPPort;
// use for tcp connections
boost::shared_ptr<boost::asio::ip::tcp::socket> TCPSocket;
int PacketGroup = 1;
};
#endif
+2 -1
View File
@@ -36,7 +36,7 @@ public:
private:
// Network channels
TCPServer m_Reliable;
//UDPServer m_Unreliable;
UDPServer m_Unreliable;
UDPServer m_ServerlistRequest;
// dont forget to set these in the childrens receive logic
boost::asio::ip::address m_Address;
@@ -60,6 +60,7 @@ private:
std::vector<Events::InputCommand> m_InputCommandsToBroadcast;
//Timers
std::clock_t m_StartPingTime;
std::string m_ServerName = "";
// Packet loss logic
PacketID m_PacketID = 0;
+1 -1
View File
@@ -10,7 +10,7 @@ public:
TCPClient();
~TCPClient();
void Connect(std::string playerName, std::string address, int port);
bool Connect(std::string playerName, std::string address, int port);
void Disconnect();
void Receive(Packet& packet);
void Send(Packet & packet);
+15 -2
View File
@@ -1,5 +1,7 @@
#ifndef UDPClient_h__
#define UDPClient_h__
#include <map>
#include <algorithm>
#include <boost/asio.hpp>
#include "Network/NetworkClient.h"
@@ -10,19 +12,30 @@ public:
UDPClient();
~UDPClient();
void Connect(std::string playerName, std::string address, int port);
bool Connect(std::string playerName, std::string address, int port);
void Disconnect();
void Receive(Packet& packet);
void Send(Packet & packet);
void ReceivePackets();
void Send(Packet& packet);
void Broadcast(Packet& packet, int port);
bool IsSocketAvailable();
// Returns false if no packets are available
bool GetNextPacket(Packet& packet);
private:
typedef std::map<unsigned int, std::vector<std::pair<int, boost::shared_ptr<char>>>> PacketMap;
// Assio UDP logic
boost::asio::io_service m_IOService;
boost::asio::ip::udp::endpoint m_ReceiverEndpoint;
boost::shared_ptr<boost::asio::ip::udp::socket> m_Socket;
int m_LastReceivedSnapshotGroup = 0;
int readBuffer();
void readPartOfPacket();
PacketID m_SendPacketID = 0;
//map:(packetGroup, vector:(pair:(groupIndex, packetData)))
PacketMap m_PacketSegmentMap;
bool hasReceivedPacket(int packetGroup, int groupIndex);
// 2^19
const int m_SizeOfSocketBuffer = 524288;
};
#endif
+2
View File
@@ -3,6 +3,7 @@
#include "NetworkServer.h"
#include <boost/asio/ip/udp.hpp>
#define MAXPACKETSIZE 64000
class UDPServer : public NetworkServer
{
@@ -13,6 +14,7 @@ public:
void AcceptNewConnections(int& nextPlayerID, std::map<PlayerID, PlayerDefinition>& connectedPlayers);
void Receive(Packet & packet, PlayerDefinition & playerDefinition);
void Send(Packet & packet, PlayerDefinition & playerDefinition);
void SendToConnectedPlayers(Packet & packet, std::map<PlayerID, PlayerDefinition>& playersTosendTo);
void Send(Packet & packet);
void Send(Packet & packet, boost::asio::ip::udp::endpoint endpoint);
void Broadcast(Packet & packet, int port);
@@ -13,6 +13,8 @@
#include "../Core/EntityWrapper.h"
#include "Rendering/AutoBlendQueue.h"
#include "../Input/EInputCommand.h"
#include "../Core/EEntityDeleted.h"
#include "Rendering/ESetBlendWeight.h"
#include "imgui/imgui.h"
class AnimationSystem : public ImpureSystem
@@ -28,6 +30,13 @@ private:
EventRelay<AnimationSystem, Events::AutoAnimationBlend> m_EAutoAnimationBlend;
bool OnAutoAnimationBlend(Events::AutoAnimationBlend& e);
EventRelay<AnimationSystem, Events::EntityDeleted> m_EEntityDeleted;
bool OnEntityDeleted(Events::EntityDeleted& e);
EventRelay<AnimationSystem, Events::SetBlendWeight> m_ESetBlendWeight;
bool OnSetBlendWeight(Events::SetBlendWeight& e);
std::unordered_map<EntityWrapper, AutoBlendQueue> m_AutoBlendQueues;
};
@@ -37,6 +37,8 @@ public:
std::shared_ptr<BlendTree> GetBlendTree();
AutoBlendQueue::AutoBlendJob& GetActiveBlendJob();
bool Empty() { return m_BlendQueue.empty(); }
private:
std::list<AutoblendNode> m_BlendQueue;
+6 -3
View File
@@ -75,7 +75,6 @@ public:
std::vector<glm::mat4> GetFinalPose() { return m_FinalPose; }
glm::mat4 GetBoneTransform(int boneID);
bool IsValid() { return (m_Root == nullptr ? false : true); }
void PrintTree();
BlendTree::AutoBlendInfo AutoBlendStep(AutoBlendInfo blendInfo);
@@ -84,16 +83,20 @@ public:
EntityWrapper GetSubTreeRoot(std::string nodeName);
std::vector<EntityWrapper> GetSingleLevelRoots(std::string name);
std::vector<EntityWrapper> GetEntitesByName(std::string name);
void SetWeightByName(std::string name, double weight);
private:
Skeleton* m_Skeleton = nullptr;
Node* m_Root = nullptr;
std::vector<glm::mat4> m_FinalPose;
std::map<int, glm::mat4> m_FinalBoneTransforms;
std::vector<BlendTree::Node*> FindNodesByName(std::string name);
std::vector<glm::mat4> AccumulateFinalPose();
BlendTree::Node* FillTreeByName(Node* parentNode, std::string name, EntityWrapper parentEntity);
std::vector<BlendTree::Node*> FindNodesByName(std::string name);
void Blend(std::map<int, Skeleton::PoseData>& pose);
};
+70
View File
@@ -0,0 +1,70 @@
#ifndef BlurHUD_h__
#define BlurHUD_h__
#include "IRenderer.h"
#include "DrawBloomPassState.h"
//#include "LightCullingPass.h" Finalpass om den skall skickas in
#include "FrameBuffer.h"
#include "ShaderProgram.h"
//#include "Util/UnorderedMapVec2.h"
#include "Texture.h"
class BlurHUD
{
public:
BlurHUD(IRenderer* renderer);
~BlurHUD() { }
void InitializeTextures();
void InitializeFrameBuffers();
void InitializeShaderPrograms();
void InitializeBuffers();
void ClearBuffer();
void FillGaussianBuffer(FrameBuffer* fb);
GLuint Draw(GLuint texture, RenderScene& scene);
void OnWindowResize();
void FillStencil(RenderScene& scene);
GLuint CombineTextures(GLuint texture1, GLuint texture2);
//Getters
//Return the blurred result of the texture that was sent into draw
GLuint GaussianTexture() const {
if (m_Quality == 0) {
return m_BlackTexture->m_Texture;
} else {
return m_GaussianTexture_vert;
}
}
private:
Texture* m_BlackTexture;
Model* m_ScreenQuad;
const IRenderer* m_Renderer;
ConfigFile* m_Config;
//const LightCullingPass* m_LightCullingPass
int m_Iterations = 3;
int m_Quality = 0;
float m_BlurQuality = 4.f;
GLuint m_GaussianTexture_horiz = 0;
GLuint m_GaussianTexture_vert = 0;
GLuint m_DepthStencil_horiz = 0;
GLuint m_DepthStencil_vert = 0;
GLuint m_CombinedTexture = 0;
FrameBuffer m_GaussianFrameBuffer_horiz;
FrameBuffer m_GaussianFrameBuffer_vert;
FrameBuffer m_CombinedTextureBuffer;
ShaderProgram* m_GaussianProgram_horiz;
ShaderProgram* m_GaussianProgram_vert;
ShaderProgram* m_FillDepthStencilProgram;
ShaderProgram* m_CombineTexturesProgram;
};
#endif
+1 -1
View File
@@ -15,7 +15,7 @@ public:
void GenerateCubeMapTexture();
//GLuint CubeMapTexture() const { return m_CubeMapTexture; }
GLuint m_CubeMapTexture = -1;
GLuint m_CubeMapTexture = 0;
private:
IRenderer* m_Renderer;
+10 -4
View File
@@ -13,7 +13,7 @@ class DrawBloomPass
{
public:
DrawBloomPass(IRenderer* renderer, ConfigFile* config);
~DrawBloomPass() { }
~DrawBloomPass();
void InitializeTextures();
void InitializeFrameBuffers();
void InitializeShaderPrograms();
@@ -33,12 +33,14 @@ public:
if (m_Quality == 0) {
return m_BlackTexture->m_Texture;
} else {
return m_GaussianTexture_vert;
return m_FinalGaussianTexture;
}
}
private:
void GaussianLodPass(GLuint mipMap, GLuint texture);
void CombineGaussianBlur();
Texture* m_BlackTexture;
Model* m_ScreenQuad;
@@ -47,15 +49,19 @@ private:
//const LightCullingPass* m_LightCullingPass
int m_Iterations;
int m_Quality = 0;
int m_BloomLod = 5;
GLuint m_GaussianTexture_horiz = 0;
GLuint m_GaussianTexture_vert = 0;
GLuint m_FinalGaussianTexture = 0;
FrameBuffer m_GaussianFrameBuffer_horiz;
FrameBuffer m_GaussianFrameBuffer_vert;
FrameBuffer* m_GaussianFrameBuffer_horiz = nullptr;
FrameBuffer* m_GaussianFrameBuffer_vert = nullptr;
FrameBuffer m_GaussianCombineBuffer;
ShaderProgram* m_GaussianProgram_horiz;
ShaderProgram* m_GaussianProgram_vert;
ShaderProgram* m_GaussianCombineProgram;
};
+17 -8
View File
@@ -11,16 +11,18 @@
#include "Util/UnorderedMapVec2.h"
#include "Util/CommonFunctions.h"
#include "Texture.h"
#include "ShadowPass.h"
#include "BlurHUD.h"
class DrawFinalPass
{
public:
DrawFinalPass(IRenderer* renderer, LightCullingPass* lightCullingPass, CubeMapPass* cubeMapPass, SSAOPass* ssaoPass);
~DrawFinalPass() { }
DrawFinalPass(IRenderer* renderer, LightCullingPass* lightCullingPass, CubeMapPass* cubeMapPass, SSAOPass* ssaoPass, ShadowPass* shadowPass);
~DrawFinalPass();
void InitializeTextures();
void InitializeFrameBuffers();
void InitializeShaderPrograms();
void Draw(RenderScene& scene);
void Draw(RenderScene& scene, BlurHUD* blurHUDPass);
void ClearBuffer();
void OnWindowResize();
@@ -28,6 +30,10 @@ public:
GLuint BloomTexture() const { return m_BloomTexture; }
//Return the texture with diffuse and lighting of the scene.
GLuint SceneTexture() const { return m_SceneTexture; }
//Return the SceneTexture with the blurred HUD bits.
GLuint CombinedSceneTexture() const { return m_CombinedTexture; }
//Return the blurred scene texture.
GLuint FullBlurredTexture() const { return m_FullBlurredTexture; }
//Return the framebuffer used in the scene rendering stage.
FrameBuffer* FinalPassFrameBuffer() { return &m_FinalPassFrameBuffer; }
@@ -52,11 +58,13 @@ private:
FrameBuffer m_FinalPassFrameBuffer;
FrameBuffer m_ShieldDepthFrameBuffer;
GLuint m_BloomTexture;
GLuint m_SceneTexture;
GLuint m_DepthBuffer;
GLuint m_ShieldBuffer;
GLuint m_CubeMapTexture;
GLuint m_BloomTexture = 0;
GLuint m_SceneTexture = 0;
GLuint m_DepthBuffer = 0;
GLuint m_ShieldBuffer = 0;
GLuint m_CubeMapTexture = 0;
GLuint m_FullBlurredTexture;
GLuint m_CombinedTexture; //This can be removed for less memory usage, just set m_sceneTexture to the return from m_BlurHUDPass.CombineTextures
//maqke this component based i guess?
GLuint m_ShieldPixelRate = 16;
@@ -65,6 +73,7 @@ private:
const LightCullingPass* m_LightCullingPass;
const CubeMapPass* m_CubeMapPass;
const SSAOPass* m_SSAOPass;
const ShadowPass* m_ShadowPass;
ShaderProgram* m_ForwardPlusProgram;
ShaderProgram* m_ExplosionEffectProgram;
@@ -18,7 +18,6 @@ struct AutoAnimationBlend : Event
bool Reverse = false;
bool Restart = false;
bool SingleLevelBlend = false;
double Weight = -1.0;
EntityWrapper AnimationEntity = EntityWrapper::Invalid;
@@ -0,0 +1,19 @@
#ifndef EResolutionChanged_h__
#define EResolutionChanged_h__
#include "../Core/Event.h"
#include "../Core/Util/Rectangle.h"
namespace Events
{
// Fired when the framebuffer size changes
struct ResolutionChanged : Event
{
Rectangle OldResolution;
Rectangle NewResolution;
};
}
#endif
@@ -0,0 +1,20 @@
#ifndef Events_SetBlendWeight_h__
#define Events_SetBlendWeight_h__
#include "../Core/EventBroker.h"
#include "../Core/EntityWrapper.h"
namespace Events
{
//Sets the blend weight for all nodes with "NodeName"
struct SetBlendWeight : Event
{
EntityWrapper RootNode = EntityWrapper::Invalid;
std::string NodeName;
double Weight;
};
}
#endif
@@ -15,8 +15,8 @@
struct ExplosionEffectJob : ModelJob
{
ExplosionEffectJob(ComponentWrapper explosionEffectComponent, ::Model* model, Camera* camera, glm::mat4 matrix, ::RawModel::MaterialProperties matGroup, ComponentWrapper modelComponent, ::World* world, glm::vec4 fillColor, float fillPercentage, bool isShielded)
: ModelJob(model, camera, matrix, matGroup, modelComponent, world, fillColor, fillPercentage, isShielded)
ExplosionEffectJob(ComponentWrapper explosionEffectComponent, ::Model* model, Camera* camera, glm::mat4 matrix, ::RawModel::MaterialProperties matGroup, ComponentWrapper modelComponent, ::World* world, glm::vec4 fillColor, float fillPercentage, bool isShielded, bool shadow)
: ModelJob(model, camera, matrix, matGroup, modelComponent, world, fillColor, fillPercentage, isShielded, shadow)
{
ExplosionOrigin = (glm::vec3)explosionEffectComponent["ExplosionOrigin"];
TimeSinceDeath = (double)explosionEffectComponent["TimeSinceDeath"];
+17 -6
View File
@@ -7,11 +7,12 @@
class BufferResource
{
public:
BufferResource(GLuint* resourceHandle, GLenum resourceType, GLenum attachment);
BufferResource(GLuint* resourceHandle, GLenum resourceType, GLenum attachment, GLuint mipMapLod);
GLuint* m_ResourceHandle;
GLenum m_ResourceType;
GLenum m_Attachment;
GLuint m_MipMapLod = 0;
private:
};
@@ -20,15 +21,15 @@ template <GLenum RESOURCETYPE>
class ResourceType : public BufferResource
{
public:
ResourceType(GLuint* resourceHandle, GLenum attachment)
: BufferResource(resourceHandle, RESOURCETYPE, attachment) { }
ResourceType(GLuint* resourceHandle, GLenum attachment, GLuint mipMapLod)
: BufferResource(resourceHandle, RESOURCETYPE, attachment, mipMapLod) { }
};
class Texture2D : public ResourceType<GL_TEXTURE_2D>
{
public:
Texture2D(GLuint* resourceHandle, GLenum attachment)
: ResourceType(resourceHandle, attachment) { };
Texture2D(GLuint* resourceHandle, GLenum attachment, GLuint mipMapLod = 0)
: ResourceType(resourceHandle, attachment, mipMapLod) { };
~Texture2D();
};
@@ -37,12 +38,22 @@ class RenderBuffer : public ResourceType<GL_RENDERBUFFER>
{
public:
RenderBuffer(GLuint* resourceHandle, GLenum attachment)
: ResourceType(resourceHandle, attachment)
: ResourceType(resourceHandle, attachment, 0)
{ };
~RenderBuffer();
};
class Texture2DArray : public ResourceType<GL_TEXTURE_2D_ARRAY>
{
public:
Texture2DArray(GLuint* resourceHandle, GLenum attachment)
: ResourceType(resourceHandle, attachment, 0)
{ };
~Texture2DArray();
};
class FrameBuffer
{
public:
+3 -3
View File
@@ -54,7 +54,7 @@ private:
struct Frustum {
Plane Planes[4];
};
Frustum* m_Frustums;
Frustum* m_Frustums = nullptr;
//This should be a component
struct LightSource {
@@ -74,11 +74,11 @@ private:
glm::vec2 Padding = glm::vec2(1.f, 2.f);
};
LightGrid* m_LightGrid;
LightGrid* m_LightGrid = nullptr;
int m_LightOffset = 0;
float* m_LightIndex;
float* m_LightIndex = nullptr;
};
+9 -21
View File
@@ -19,31 +19,20 @@
struct ModelJob : RenderJob
{
ModelJob(Model* model, Camera* camera, glm::mat4 matrix, ::RawModel::MaterialProperties matProp, ComponentWrapper modelComponent, World* world, glm::vec4 fillColor, float fillPercentage, bool isShielded)
ModelJob(Model* model, Camera* camera, glm::mat4 matrix, ::RawModel::MaterialProperties matProp, ComponentWrapper modelComponent, World* world, glm::vec4 fillColor, float fillPercentage, bool isShielded, bool shadow)
: RenderJob()
{
Model = model;
ModelID = model->ResourceID;
Type = matProp.type;
::RawModel::MaterialBasic* matGroup = matProp.material;
ShaderID = matProp.ShaderID;
switch(matProp.type){
case ::RawModel::MaterialType::Basic:
if (Model->IsSkinned()) {
ShaderID = ResourceManager::Load<ShaderProgram>("#ForwardPlusSkinnedProgram")->ResourceID;
}
else {
ShaderID = ResourceManager::Load<ShaderProgram>("#ForwardPlusProgram")->ResourceID;
}
TextureID = 0;
break;
case ::RawModel::MaterialType::SingleTextures:
{
if (Model->IsSkinned()) {
ShaderID = ResourceManager::Load<ShaderProgram>("#ForwardPlusSkinnedProgram")->ResourceID;
}
else {
ShaderID = ResourceManager::Load<ShaderProgram>("#ForwardPlusProgram")->ResourceID;
}
::RawModel::MaterialSingleTextures* singleTextures = static_cast<::RawModel::MaterialSingleTextures*>(matProp.material);
TextureID = (singleTextures->ColorMap.Texture) ? singleTextures->ColorMap.Texture->ResourceID : 0;
if (modelComponent["DiffuseTexture"]) {
@@ -65,12 +54,6 @@ struct ModelJob : RenderJob
break;
case ::RawModel::MaterialType::SplatMapping:
{
if (Model->IsSkinned()) {
ShaderID = ResourceManager::Load<ShaderProgram>("#ForwardPlusSplatMapSkinnedProgram")->ResourceID;
}
else {
ShaderID = ResourceManager::Load<ShaderProgram>("#ForwardPlusSplatMapProgram")->ResourceID;
}
::RawModel::MaterialSplatMapping* SplatTextures = static_cast<::RawModel::MaterialSplatMapping*>(matProp.material);
SplatMap = &SplatTextures->SplatMap;
@@ -111,10 +94,11 @@ struct ModelJob : RenderJob
Color = modelComponent["Color"];
GlowIntensity = ((double)modelComponent["GlowIntensity"]);
Entity = modelComponent.EntityID;
glm::vec3 abspos = Transform::AbsolutePosition(world, modelComponent.EntityID);
glm::vec3 abspos = glm::vec3(matrix[3][0], matrix[3][1], matrix[3][2]);
glm::vec3 worldpos = glm::vec3(camera->ViewMatrix() * glm::vec4(abspos, 1));
Depth = worldpos.z;
World = world;
Shadow = shadow;
FillColor = fillColor;
FillPercentage = fillPercentage;
@@ -162,9 +146,13 @@ struct ModelJob : RenderJob
glm::vec4 FillColor = glm::vec4(0);
float FillPercentage = 0.0;
bool IsShielded;
bool Shadow;
void CalculateHash() override
{
Hash = ShaderID << 20 + ModelID << 10 + TextureID;
Hash = TextureID;
Hash += ModelID << 10;
Hash += ShaderID << 20;
}
};
+2 -2
View File
@@ -52,8 +52,8 @@ private:
std::unordered_map<glm::ivec2, PickingInfo> m_PickingColorsToEntity;
GLuint m_PickingTexture;
GLuint m_DepthBuffer;
GLuint m_PickingTexture = 0;
GLuint m_DepthBuffer = 0;
FrameBuffer m_PickingBuffer;
@@ -18,6 +18,7 @@
#include "../Core/ResourceManager.h"
#include "Texture.h"
#include "Skeleton.h"
#include "ShaderProgram.h"
#include "boost\endian\buffers.hpp"
@@ -87,6 +88,7 @@ public:
struct MaterialProperties {
MaterialType type;
MaterialBasic* material;
unsigned int ShaderID = 0;
};
const Vertex* Vertices() const {
+5 -6
View File
@@ -16,16 +16,15 @@ struct RenderJob
public:
float Depth;
bool operator<(const RenderJob& rhs)
{
return this->Hash < rhs.Hash;
}
protected:
uint64_t Hash;
virtual void CalculateHash() = 0;
bool operator<(const RenderJob& rhs)
{
return this->Hash < rhs.Hash;
}
};
#endif
+1
View File
@@ -33,6 +33,7 @@ struct RenderScene
Rectangle Viewport;
bool ClearDepth = false;
bool ShouldBlur = false;
glm::vec4 AmbientColor;
void Clear()
+3
View File
@@ -19,6 +19,7 @@
#include "../Core/Octree.h"
#include "../Collision/EntityAABB.h"
#include "../Core/ConfigFile.h"
#include "EResolutionChanged.h"
class RenderSystem : public ImpureSystem
{
@@ -36,6 +37,8 @@ private:
EntityWrapper m_LocalPlayer = EntityWrapper::Invalid;
Octree<EntityAABB>* m_Octree;
EventRelay<RenderSystem, Events::ResolutionChanged> m_EResolutionChanged;
bool OnResolutionChanged(Events::ResolutionChanged &event);
EventRelay<RenderSystem, Events::SetCamera> m_ESetCamera;
bool OnSetCamera(Events::SetCamera &event);
EventRelay<RenderSystem, Events::InputCommand> m_EInputCommand;
+13 -2
View File
@@ -18,6 +18,7 @@
#include "DrawColorCorrectionPass.h"
#include "SSAOPass.h"
#include "CubeMapPass.h"
#include "BlurHUD.h"
#include "../Core/EventBroker.h"
#include "ImGuiRenderPass.h"
#include "Camera.h"
@@ -26,16 +27,22 @@
#include "TextPass.h"
#include "Util/CommonFunctions.h"
#include "Core/PerformanceTimer.h"
#include "ShadowPass.h"
#include "EResolutionChanged.h"
class Renderer : public IRenderer
{
static void glfwFrameBufferCallback(GLFWwindow* window, int width, int height);
static void glfwWindowSizeCallback(GLFWwindow* window, int width, int height);
public:
Renderer(EventBroker* eventBroker, ConfigFile* config)
: m_EventBroker(eventBroker)
, m_Config(config)
{ }
~Renderer();
virtual void SetResolution(const Rectangle& resolution) override;
virtual void Initialize() override;
virtual void Update(double dt) override;
@@ -43,7 +50,6 @@ public:
virtual PickData Pick(glm::vec2 screenCoord) override;
private:
//----------------------Variables----------------------//
@@ -75,6 +81,8 @@ private:
DrawColorCorrectionPass* m_DrawColorCorrectionPass;
SSAOPass* m_SSAOPass;
CubeMapPass* m_CubeMapPass;
ShadowPass* m_ShadowPass;
BlurHUD* m_BlurHUDPass;
//----------------------Functions----------------------//
void InitializeWindow();
@@ -85,11 +93,14 @@ private:
void InputUpdate(double dt);
//void PickingPass(RenderQueueCollection& rq);
//void DrawScreenQuad(GLuint textureToDraw);
void setWindowSize(Rectangle size);
void updateFramebufferSize();
static bool DepthSort(const std::shared_ptr<RenderJob> &i, const std::shared_ptr<RenderJob> &j) { return (i->Depth < j->Depth); }
void SortRenderJobsByDepth(RenderScene &scene);
void GenerateTexture(GLuint* texture, GLenum wrapping, GLenum filtering, glm::vec2 dimensions, GLint internalFormat, GLint format, GLenum type);
//--------------------ShaderPrograms-------------------//
//--------------------ShaderPrograms-------------------//
ShaderProgram* m_BasicForwardProgram;
ShaderProgram* m_ExplosionEffectProgram;
+1 -1
View File
@@ -14,7 +14,7 @@ class SSAOPass
{
public:
SSAOPass(IRenderer* renderer, ConfigFile* config);
~SSAOPass() { };
~SSAOPass();
void ChangeQuality(int quality);
+2
View File
@@ -21,6 +21,8 @@ public:
std::string GetFileName() const;
GLuint GetHandle() const;
bool IsCompiled() const;
static std::string ReadFile(std::string fileName);
private:
protected:
GLenum m_ShaderType;
std::string m_FileName;
+88
View File
@@ -0,0 +1,88 @@
#ifndef ShadowPass_h__
#define ShadowPass_h__
#include "IRenderer.h"
#include "FrameBuffer.h"
#include "ShaderProgram.h"
#include "../Core/EventBroker.h"
#include "../Core/World.h"
#include "ShadowPassState.h"
#include "imgui/imgui.h"
#define MAX_SPLITS 4
enum NearFar { NEAR = 0, FAR = 1 };
enum LRBT { LEFT = 0, RIGHT = 1, BOTTOM = 2, TOP = 3 };
struct ShadowFrustum
{
float NearClip;
float FarClip;
float FOV;
float AspectRatio;
glm::vec3 MiddlePoint;
float Radius;
std::array<float, 4> LRBT;
std::array<glm::vec3, 8> CornerPoint;
};
class ShadowPass
{
public:
ShadowPass(IRenderer* renderer);
ShadowPass(IRenderer * renderer, int ShadowResX, int ShadowResY);
~ShadowPass();
void InitializeFrameBuffers();
void InitializeShaderPrograms();
void ClearBuffer();
void Draw(RenderScene& scene);
void DebugGUI();
GLuint DepthMap() const { return m_DepthMap; }
std::array<glm::mat4, MAX_SPLITS> LightP() const { return m_LightProjection; }
std::array<glm::mat4, MAX_SPLITS> LightV() const { return m_LightView; }
std::array<float, MAX_SPLITS> FarDistance() const { std::array<float, MAX_SPLITS> f; for (int i = 0; i < MAX_SPLITS; i++) f[i] = m_shadowFrusta[i].FarClip; return f; }
int CurrentNrOfSplits() const { return m_CurrentNrOfSplits; }
void SetSplitWeight(float split_weight) { m_SplitWeight = split_weight; };
private:
void InitializeCameras(RenderScene & scene);
void UpdateSplitDist(std::array<ShadowFrustum, MAX_SPLITS>& frusta, float near_distance, float far_distance);
void UpdateFrustumPoints(ShadowFrustum& frustum, glm::vec3 camera_position, glm::vec3 view_dir);
void UpdateFrustumPoints(ShadowFrustum& frustum, glm::mat4 p, glm::mat4 v);
void PointsToLightspace(ShadowFrustum& frustum, glm::mat4 v);
float FindRadius(ShadowFrustum& frustum);
void RadiusToLightspace(ShadowFrustum& frustum);
EventBroker* m_EventBroker;
const IRenderer* m_Renderer;
GLuint m_DepthMap;
FrameBuffer m_DepthBuffer;
ShaderProgram* m_ShadowProgram;
ShaderProgram* m_ShadowProgramSkinned;
std::array<glm::mat4, MAX_SPLITS> m_LightProjection;
std::array<glm::mat4, MAX_SPLITS> m_LightView;
GLfloat m_NearFarPlane[2] = { -34.f, 27.f };
GLuint m_ResolutionSizeWidth = 1024 * 2;
GLuint m_ResolutionSizeHeight = 1024 * 2;
bool m_TransparentObjects = false;
bool m_TexturedShadows = false;
bool m_EnableShadows = true;
int m_CurrentNrOfSplits = 4;
float m_SplitWeight = 0.962f;
std::array<ShadowFrustum, MAX_SPLITS> m_shadowFrusta;
Texture* m_WhiteTexture = ResourceManager::Load<Texture>("Textures/Core/White.png");
};
#endif
@@ -0,0 +1,15 @@
#ifndef ShadowPassState_h_
#define ShadowPassState_h_
#include "Rendering/RenderState.h"
class ShadowPassState : public RenderState
{
public:
ShadowPassState(GLuint frameBuffer);
~ShadowPassState();
private:
};
#endif
+31 -3
View File
@@ -7,6 +7,7 @@
#include "../GLM.h"
#include "../Core/ComponentWrapper.h"
#include "Texture.h"
#include "TextureSprite.h"
#include "Model.h"
#include "RenderJob.h"
#include "../Core/ResourceManager.h"
@@ -20,18 +21,21 @@ struct SpriteJob : RenderJob
SpriteJob(ComponentWrapper cSprite, Camera* camera, glm::mat4 matrix, World* world, glm::vec4 fillColor, float fillPercentage, bool depthSorted, bool isIndicator)
: RenderJob()
{
Model = ResourceManager::Load<::Model>("Models/Core/UnitQuad.mesh");
Model = ResourceManager::Load<::Model>((std::string)cSprite["Model"]);
::RawModel::MaterialProperties matProp = Model->MaterialGroups().front();
TextureID = 0;
DiffuseTexture = CommonFunctions::LoadTexture(cSprite["DiffuseTexture"], true);
DiffuseTexture = CommonFunctions::TryLoadResource<TextureSprite, true>(cSprite["DiffuseTexture"]);
IncandescenceTexture = CommonFunctions::TryLoadResource<TextureSprite, true>(cSprite["GlowMap"]);
IncandescenceTexture = CommonFunctions::LoadTexture(cSprite["GlowMap"], true);
Linear = (bool)cSprite["Linear"];
StartIndex = matProp.material->StartIndex;
EndIndex = matProp.material->EndIndex;
Matrix = matrix;
Color = cSprite["Color"];
BlurBackground = (bool)cSprite["BlurBackground"];
Entity = cSprite.EntityID;
Position = Transform::AbsolutePosition(world, cSprite.EntityID);
Depth = 0;
@@ -45,6 +49,26 @@ struct SpriteJob : RenderJob
FillColor = fillColor;
FillPercentage = fillPercentage;
glm::vec3 scale = Transform::AbsoluteScale(world, cSprite.EntityID);
if((bool)cSprite["KeepRatio"] == true) {
if(scale.y >= scale.x) {
ScaleY = (scale.x)/(scale.y);
ScaleX = 1.f;
} else {
ScaleY = 1.f;
ScaleX = (scale.x)/(scale.y);
}
} else {
if ((bool)cSprite["KeepRatioX"] == true) {
ScaleX = scale.x;
}
if ((bool)cSprite["KeepRatioY"] == true) {
ScaleY = scale.y;
}
}
};
unsigned int TextureID;
@@ -65,6 +89,10 @@ struct SpriteJob : RenderJob
bool Pickable;
bool IsIndicator = false;
bool BlurBackground = false;
float ScaleX = 1;
float ScaleY = 1;
bool Linear = false;
glm::vec4 FillColor = glm::vec4(0);
float FillPercentage = 0.0;
+1
View File
@@ -23,6 +23,7 @@ public:
private:
void renderText(std::string text, Font* font, TextJob::AlignmentEnum alignment, glm::vec4 color, glm::mat4 modelMatrix, glm::mat4 projectionMatrix, glm::mat4 viewMatrix);
std::string parseColors(std::string text, std::map<int, glm::vec4>& colorChanges, glm::vec4 originalColor);
Font* font;
GLuint VAO, VBO;
+1 -1
View File
@@ -9,7 +9,7 @@ class Texture : public BaseTexture
{
friend class ResourceManager;
private:
protected:
Texture(std::string path);
public:
+26
View File
@@ -0,0 +1,26 @@
#ifndef TextureSprite_h__
#define TextureSprite_h__
#include "../OpenGL.h"
#include "BaseTexture.h"
#include "Texture.h"
#include "PNG.h"
class TextureSprite : public Texture
{
friend class ResourceManager;
protected:
TextureSprite(std::string path);
public:
~TextureSprite();
void Bind(GLenum textureUnit = GL_TEXTURE0);
GLuint m_Texture = 0;
unsigned char* Data = nullptr;
};
#endif
@@ -8,7 +8,23 @@
namespace CommonFunctions
{
Texture* LoadTexture(std::string path, bool threaded);
//Loads Texture/SpriteTexture and return null if it fails
template <typename T, bool threaded>
Texture* TryLoadResource(std::string path)
{
Texture* img;
try {
img = ResourceManager::Load<T, threaded>(path);
} catch (const Resource::StillLoadingException&) {
img = ResourceManager::Load<T>("Textures/Core/ErrorTexture.png");
} catch (const std::exception&) {
img = nullptr;
}
return img;
}
void GenerateTexture(GLuint* texture, GLenum wrapping, GLenum filtering, glm::vec2 dimensions, GLint internalFormat, GLint format, GLenum type);
void GenerateMultiSampleTexture(GLuint* texture, int numSamples, glm::vec2 dimensions, GLint internalFormat);
void GenerateMipMapTexture(GLuint* texture, GLenum wrapping, glm::vec2 dimensions, GLint format, GLenum type, GLint numMipMaps);
+4
View File
@@ -16,7 +16,11 @@ inline bool _GLERROR(const char* info, const char* file, const char* func, unsig
return false;
}
#ifdef DEBUG
#define GLERROR(function) \
_GLERROR(function, __BASE_FILE__, __func__, __LINE__)
#else
#define GLERROR(function) false
#endif
#endif
+16
View File
@@ -0,0 +1,16 @@
#ifndef Events_ChangeBGM_h__
#define Events_ChangeBGM_h__
#include <string>
#include "../Engine/Core/EventBroker.h"
namespace Events
{
struct ChangeBGM : Event
{
std::string FilePath = "";
};
}
#endif // Events_ChangeBGM_h__
@@ -0,0 +1,17 @@
#ifndef Events_PlayAnnouncerVoice_h__
#define Events_PlayAnnouncerVoice_h__
#include <string>
#include "../Engine/Core/EventBroker.h"
namespace Events
{
struct PlayAnonuncerVoice : public Event
{
std::string FilePath = "";
};
}
#endif
+2 -1
View File
@@ -12,7 +12,8 @@ namespace Events
// Sound behavior is thereby specified in the SoundEmitter component.
struct PlaySoundOnEntity : public Event
{
EntityID EmitterID = 0;
EntityWrapper Emitter = EntityWrapper::Invalid;
float Gain = 1.f;
std::string FilePath = "";
};
+16
View File
@@ -0,0 +1,16 @@
#ifndef Events_SetAnnouncerGain_h__
#define Events_SetAnnouncerGain_h__
#include "../Engine/Core/EventBroker.h"
namespace Events
{
struct SetAnnouncerGain : public Event
{
float Gain = 1;
};
}
#endif //
+35 -18
View File
@@ -9,32 +9,35 @@
#include "OpenAL/al.h"
#include "OpenAL/alc.h"
#include "imgui/imgui.h"
#include "Core/World.h"
#include "Core/EventBroker.h"
#include "../Engine/Core/World.h"
#include "../Engine/Core/EventBroker.h"
#include "../Engine/Core/ResourceManager.h"
#include "../Engine/Core/ConfigFile.h"
#include "Core/Transform.h" // Absolute transform
#include "Sound/Sound.h"
#include "../Engine/Core/Transform.h"
#include "../Engine/Sound/Sound.h"
#include "../Engine/Sound/EPlayQueueOnEntity.h"
#include "Sound/EPlaySoundOnEntity.h"
#include "Sound/EPlaySoundOnPosition.h"
#include "Sound/EPlayBackgroundMusic.h"
#include "Sound/EPauseSound.h"
#include "Sound/EContinueSound.h"
#include "Sound/EStopSound.h"
#include "Sound/ESetBGMGain.h"
#include "Sound/ESetSFXGain.h"
#include "Core/EPause.h"
#include "Core/EComponentAttached.h"
#include "../Engine/Sound/EPlaySoundOnEntity.h"
#include "../Engine/Sound/EPlaySoundOnPosition.h"
#include "../Engine/Sound/EPlayBackgroundMusic.h"
#include "../Engine/Sound/EPlayAnnouncerVoice.h"
#include "../Engine/Sound/EPauseSound.h"
#include "../Engine/Sound/EContinueSound.h"
#include "../Engine/Sound/EStopSound.h"
#include "../Engine/Sound/ESetBGMGain.h"
#include "../Engine/Sound/ESetSFXGain.h"
#include "../Engine/Sound/ESetAnnouncerGain.h"
#include "../Engine/Sound/EChangeBGM.h"
#include "../Engine/Core/EPause.h"
#include "../Engine/Core/EComponentAttached.h"
#include "../Core/EPlayerSpawned.h"
typedef std::pair<ALuint, std::vector<ALuint>> QueuedBuffers;
enum class SoundType {
SFX,
BGM
BGM,
Announcer
};
struct Source
@@ -43,6 +46,7 @@ struct Source
Sound* SoundResource = nullptr;
ALuint ALsource;
SoundType Type;
float Duration;
};
class SoundManager
@@ -74,14 +78,20 @@ private:
ALenum getSourceState(ALuint source);
void setGain(Source* source, float gain);
void setSoundProperties(Source* source, ComponentWrapper* soundComponent);
float getDurationSeconds(Source* source);
float getTimeOffsetSeconds(Source* source);
// Specific logic
void playSound(Source* source);
// Need to be the same format (sample rate etc)
// Needs to be the same format (sample rate etc)
void playQueue(QueuedBuffers qb);
void stopSound(Source* source);
Source* createSource(std::string filePath);
std::unordered_map<EntityID, Source*> m_Sources;
void matchBGMLoop();
Source* m_CurrentBGM = nullptr;
Source* m_CurrentBGMCombo = nullptr;
bool m_DrumLoopHasBeenStarted = false;
// Logic
World* m_World = nullptr;
@@ -93,6 +103,7 @@ private:
float m_BGMVolumeChannel = 1.0f;
float m_SFXVolumeChannel = 1.0f;
float m_AnnouncerVolumeChannel = 1.0f;
EntityWrapper m_LocalPlayer = EntityWrapper();
// Events
@@ -102,6 +113,8 @@ private:
bool OnPlaySoundOnPosition(const Events::PlaySoundOnPosition &e);
EventRelay<SoundManager, Events::PlayBackgroundMusic> m_EPlayBackgroundMusic;
bool OnPlayBackgroundMusic(const Events::PlayBackgroundMusic &e);
EventRelay<SoundManager, Events::PlayAnonuncerVoice> m_EPlayAnnouncerVoice;
bool OnPlayAnnouncerVoice(const Events::PlayAnonuncerVoice& e);
EventRelay<SoundManager, Events::PauseSound> m_EPauseSound;
bool OnPauseSound(const Events::PauseSound &e);
EventRelay<SoundManager, Events::StopSound> m_EStopSound;
@@ -112,6 +125,8 @@ private:
bool OnSetBGMGain(const Events::SetBGMGain &e);
EventRelay<SoundManager, Events::SetSFXGain> m_ESetSFXGain;
bool OnSetSFXGain(const Events::SetSFXGain &e);
EventRelay<SoundManager, Events::SetAnnouncerGain> m_ESetAnnouncerGain;
bool OnSetAnnouncerGain(const Events::SetAnnouncerGain& e);
EventRelay<SoundManager, Events::ComponentAttached> m_EComponentAttached;
bool OnComponentAttached(const Events::ComponentAttached &e);
EventRelay<SoundManager, Events::Pause> m_EPause;
@@ -122,6 +137,8 @@ private:
bool OnPlayerSpawned(const Events::PlayerSpawned &e);
EventRelay<SoundManager, Events::PlayQueueOnEntity> m_EPlayQueueOnEntity;
bool OnPlayQueueOnEntity(const Events::PlayQueueOnEntity &e);
EventRelay<SoundManager, Events::ChangeBGM> m_EChangeBGM;
bool OnChangeBGM(const Events::ChangeBGM &e);
};
@@ -30,6 +30,7 @@ private:
bool CapturePointSystem::OnTriggerLeave(const Events::TriggerLeave& e);
EventRelay<CapturePointSystem, Events::Captured> m_ECaptured;
bool CapturePointSystem::OnCaptured(const Events::Captured& e);
void ChangeCapturePointModelsVisibility(EntityWrapper &capturePointModels, bool isOwner);
bool m_WinnerWasFound = false;
//need to track these variables for the captureSystem to work as per design!
@@ -15,6 +15,7 @@
#include "Rendering/Util/CommonFunctions.h"
//#define INDICATOR_TEST
#include "Core/ConfigFile.h"
class DamageIndicatorSystem : public ImpureSystem
{
@@ -40,6 +41,8 @@ private:
std::vector<DamageIndicatorStruct> updateDamageIndicatorVector;
float CalculateAngle(EntityWrapper player, glm::vec3 enemyPos);
bool m_NetworkEnabled;
//for tests
#ifdef INDICATOR_TEST
glm::vec3 DamageIndicatorTest(EntityWrapper player);
@@ -1,15 +1,18 @@
#ifndef MainMenuSystem_h__
#define MainMenuSystem_h__
#include "../Core/System.h"
#include "../Rendering/IRenderer.h"
#include "../Core/ResourceManager.h"
#include "../Core/Event.h"
#include "Core/System.h"
#include "Rendering/IRenderer.h"
#include "Core/ResourceManager.h"
#include "Core/Event.h"
#include "Systems/SpawnerSystem.h"
#include "EButtonClicked.h"
#include "EButtonPressed.h"
#include "EButtonReleased.h"
#include "GUI/EButtonClicked.h"
#include "GUI/EButtonPressed.h"
#include "GUI/EButtonReleased.h"
#include "Input/EInputCommand.h"
#include "Network/ESearchForServers.h"
#include "Network/EConnectRequest.h"
class MainMenuSystem : public ImpureSystem
@@ -20,6 +23,7 @@ public:
private:
IRenderer* m_Renderer;
void OpenSubMenu(const Events::InputCommand& e);
EventRelay<MainMenuSystem, Events::ButtonClicked> m_EClicked;
bool OnButtonClick(const Events::ButtonClicked& e);
@@ -27,6 +31,11 @@ private:
bool OnButtonRelease(const Events::ButtonReleased& e);
EventRelay<MainMenuSystem, Events::ButtonPressed> m_EPressed;
bool OnButtonPress(const Events::ButtonPressed& e);
EventRelay<MainMenuSystem, Events::InputCommand> m_EInputCommand;
bool OnInputCommand(const Events::InputCommand& e);
std::string m_CurrentCommand = "";
EntityWrapper m_OpenSubMenu = EntityWrapper::Invalid;
};
+3
View File
@@ -24,7 +24,10 @@ private:
bool OnPlayerDeath(Events::PlayerDeath& e);
EventRelay<PlayerDeathSystem, Events::EntityDeleted> m_EEntityDeleted;
bool OnEntityDeleted(Events::EntityDeleted& e);
EventRelay<PlayerDeathSystem, Events::InputCommand> m_EInputCommand;
bool OnInputCommand(Events::InputCommand& e);
void setSpectatorCamera();
void createDeathEffect(EntityWrapper player);
};
+1 -1
View File
@@ -33,7 +33,7 @@ private:
// Used to track afterimages for sprint effect.
float m_SprintEffectTimer;
// The logic for making the sound play when player is moving
void playerStep(double dt);
void playerStep(double dt, EntityWrapper player);
// Spawn a hexagon at origin of an Entity
void spawnHexagon(EntityWrapper target);
+9
View File
@@ -15,10 +15,19 @@ public:
virtual void Update(double dt) override;
private:
// This enum must correspond to the command values for PickTeam buttons.
enum class PlayerClass
{
None = 0,
Assault,
Defender,
Sniper
};
struct SpawnRequest
{
int PlayerID;
ComponentInfo::EnumType Team;
PlayerClass Class;
};
bool m_NetworkEnabled = false;
+29
View File
@@ -0,0 +1,29 @@
#ifndef ServerListSystem_h__
#define ServerListSystem_h__
#include "Core/System.h"
#include "Rendering/IRenderer.h"
#include "Core/ResourceManager.h"
#include "Core/Event.h"
#include "Systems/SpawnerSystem.h"
#include "Core/EventBroker.h"
#include "Network/ESearchForServers.h"
#include "Network/EDisplayServerlist.h"
class ServerListSystem : public PureSystem
{
public:
ServerListSystem(SystemParams params, IRenderer* renderer);
virtual void UpdateComponent(EntityWrapper& entity, ComponentWrapper& cServerList, double dt) override;
void RefreshList();
private:
IRenderer* m_Renderer;
EventRelay<ServerListSystem, Events::DisplayServerlist> m_EServerListRecieved;
bool OnServerListRecieved(const Events::DisplayServerlist& e);
};
#endif
+6 -12
View File
@@ -2,6 +2,7 @@
#define Systems_SoundSystem_h__
#include <random>
#include <chrono>
#include "../Engine/Core/System.h"
#include "../Engine/Core/ResourceManager.h"
@@ -20,9 +21,10 @@
#include "../Engine/Collision/ETrigger.h"
#include "../Engine/Sound/EPlaySoundOnEntity.h"
#include "../Engine/Sound/EPlayBackgroundMusic.h"
#include "../Engine/Sound/EPlayAnnouncerVoice.h"
#include "../Game/Events/EDoubleJump.h"
#include "../Game/Events/EDashAbility.h"
#include "../Engine/Sound/EChangeBGM.h"
class SoundSystem : public PureSystem, ImpureSystem
{
@@ -33,14 +35,10 @@ public:
private:
std::string m_Announcer = "";
// Logic for playing a sound when a player jumps
void playerJumps();
// Temporary solution for play test.
bool m_DrumsIsPlaying = false;
double m_DrumTimer = 0.0;
bool drumTimer(double dt);
void playerJumps(EntityWrapper player);
std::default_random_engine generator;
std::default_random_engine m_RandomGenerator;
std::uniform_int_distribution<int> m_RandIntDistribution;
EventRelay<SoundSystem, Events::PlayerSpawned> m_EPlayerSpawned;
bool OnPlayerSpawned(const Events::PlayerSpawned &e);
@@ -48,10 +46,6 @@ private:
bool OnInputCommand(const Events::InputCommand &e);
EventRelay<SoundSystem, Events::DoubleJump> m_EDoubleJump;
bool OnDoubleJump(const Events::DoubleJump &e);
EventRelay<SoundSystem, Events::DashAbility> m_EDashAbility;
bool OnDashAbility(const Events::DashAbility &e);
EventRelay<SoundSystem, Events::TriggerTouch> m_ETriggerTouch;
bool OnTriggerTouch(const Events::TriggerTouch &e);
EventRelay<SoundSystem, Events::Captured> m_ECaptured;
bool OnCaptured(const Events::Captured &e);
EventRelay<SoundSystem, Events::PlayerDamage> m_EPlayerDamage;
@@ -0,0 +1,25 @@
#ifndef SpectatorCameraSystem_h__
#define SpectatorCameraSystem_h__
#include "Core/System.h"
#include "Input/EInputCommand.h"
#include "Network/EPlayerDisconnected.h"
class SpectatorCameraSystem : public ImpureSystem
{
public:
SpectatorCameraSystem(SystemParams params);
virtual void Update(double dt) override;
private:
int m_PickedTeam;
bool m_CamSetToTeamPick;
EventRelay<SpectatorCameraSystem, Events::InputCommand> m_EInputCommand;
bool OnInputCommand(const Events::InputCommand& e);
EventRelay<SpectatorCameraSystem, Events::PlayerDisconnected> m_EDisconnect;
bool OnDisconnect(const Events::PlayerDisconnected& e);
};
#endif
+23
View File
@@ -0,0 +1,23 @@
#ifndef StartSystem_h__
#define StartSystem_h__
#include "Core/System.h"
#include "Core/ResourceManager.h"
#include "Core/Event.h"
#include "Core/EventBroker.h"
#include "Rendering/ESetCamera.h"
class StartSystem : public ImpureSystem
{
public:
StartSystem(SystemParams params);
virtual void Update(double dt) override;
private:
EntityWrapper m_ActiveCamera = EntityWrapper::Invalid;
EventRelay<StartSystem, Events::SetCamera> m_ECameraActivated;
bool OnCameraActivated(const Events::SetCamera& e);
};
#endif
@@ -5,6 +5,7 @@
#include "Collision/Collision.h"
#include "Core/EPlayerDamage.h"
#include "Sound/EPlaySoundOnEntity.h"
#include "Sound/EPlaySoundOnEntity.h"
class DefenderWeaponBehaviour : public WeaponBehaviour<DefenderWeaponBehaviour>
{
+23 -20
View File
@@ -32,20 +32,19 @@ public:
virtual void UpdateComponent(EntityWrapper& entity, ComponentWrapper& cWeapon, double dt) override
{
EntityWrapper firstPersonWeapon = entity.FirstChildByName("Hands").FirstChildByName("AssaultWeapon");
EntityWrapper thirdPersonWeapon = entity.FirstChildByName("PlayerModel").FirstChildByName("AssaultWeapon");
if (IsClient && (firstPersonWeapon.Valid() || thirdPersonWeapon.Valid())) {
if (m_ActiveWeapons.count(entity) == 0) {
/* EntityWrapper firstPersonWeapon = entity.FirstChildByName("Hands").FirstChildByName("AssaultWeapon");
EntityWrapper thirdPersonWeapon = entity.FirstChildByName("PlayerModel").FirstChildByName("AssaultWeapon");
if (IsClient && (firstPersonWeapon.Valid() || thirdPersonWeapon.Valid())) {
if (m_ActiveWeapons.count(entity) == 0) {
WeaponInfo& wi = m_ActiveWeapons[entity];
wi.Player = entity;
wi.WeaponEntity = entity;
wi.FirstPersonEntity = firstPersonWeapon;
wi.ThirdPersonEntity = thirdPersonWeapon;
WeaponInfo& wi = m_ActiveWeapons[entity];
wi.Player = entity;
wi.WeaponEntity = entity;
wi.FirstPersonEntity = firstPersonWeapon;
wi.ThirdPersonEntity = thirdPersonWeapon;
OnEquip(cWeapon, wi);
}
}
OnEquip(cWeapon, wi);
}
}*/
auto weapon = getActiveWeapon(entity);
if (!weapon) {
@@ -61,7 +60,9 @@ protected:
EntityWrapper Player;
EntityWrapper WeaponEntity;
EntityWrapper FirstPersonEntity;
EntityWrapper FirstPersonPlayerModel;
EntityWrapper ThirdPersonEntity;
EntityWrapper ThirdPersonPlayerModel;
};
IRenderer* m_Renderer;
@@ -89,7 +90,7 @@ protected:
// Returns wi.FirstPersonEntity or wi.ThirdPersonEntity depending on
// if the player is in first person mode or not.
EntityWrapper getRelevantWeaponModelEntity(WeaponInfo& wi)
EntityWrapper getRelevantWeaponEntity(WeaponInfo& wi)
{
if (isPlayerInFirstPerson(wi.Player)) {
return wi.FirstPersonEntity;
@@ -137,7 +138,7 @@ protected:
void playAnimationAndReturn(EntityWrapper weaponModelEntity, const std::string& subTreeName, const std::string& animationNodeName)
{
EntityWrapper root = weaponModelEntity.FirstParentWithComponent("Model");
EntityWrapper root = weaponModelEntity;
if (!root.Valid()) {
return;
}
@@ -254,9 +255,9 @@ private:
void selectWeapon(ComponentWrapper cWeapon, EntityWrapper player)
{
if (!IsServer) {
return;
}
//if (!IsServer) {
// return;
//}
// Don't reselect weapon if it's already active
if (getActiveWeapon(player)) {
@@ -287,11 +288,11 @@ private:
// Spawn the weapon(s)
EntityWrapper firstPersonWeapon;
EntityWrapper thirdPersonWeapon;
//if (IsClient) {
if (IsClient) {
if (firstPersonAttachment.Valid()) {
firstPersonWeapon = SpawnerSystem::Spawn(firstPersonAttachment, firstPersonAttachment);
}
//}
}
if (thirdPersonAttachment.Valid()) {
thirdPersonWeapon = SpawnerSystem::Spawn(thirdPersonAttachment, thirdPersonAttachment);
}
@@ -300,7 +301,9 @@ private:
wi.Player = player;
wi.WeaponEntity = player;
wi.FirstPersonEntity = firstPersonWeapon;
wi.FirstPersonPlayerModel = firstPersonWeapon;
wi.ThirdPersonEntity = thirdPersonWeapon;
wi.ThirdPersonPlayerModel = thirdPersonWeapon.FirstParentWithComponent("Model");
OnEquip(cWeapon, wi);
}
+1
View File
@@ -39,6 +39,7 @@ ResourceLoading=true
[Sound]
BGMVolume=1.0
SFXVolume=1.0
AnnouncerVolume=1.0
Announcer=female
[SSAO]
+4 -1
View File
@@ -28,4 +28,7 @@ P=SwitchToPlayer
K=TakeDamage,1500
F2=PerformanceTimingResetAllTimers
F3=PerformanceTimingCreateExcelData
F4=SwapToClassPick
Comma=SwapToClassPick
Period=SwapToTeamPick
Enter=PickClass,1
F5=DisconnectFromServer
+5
View File
@@ -65,4 +65,9 @@
<xs:include schemaLocation="Components/InputCmdButton.xsd"/>
<xs:include schemaLocation="Components/ScoreScreen.xsd"/>
<xs:include schemaLocation="Components/ScoreIdentity.xsd"/>
<xs:include schemaLocation="Components/NetworkComponent.xsd"/>
<xs:include schemaLocation="Components/ServerIdentity.xsd"/>
<xs:include schemaLocation="Components/ServerList.xsd"/>
<xs:include schemaLocation="Components/ConfigBtnResolution.xsd"/>
<xs:include schemaLocation="Components/ConfigBtnFloat.xsd"/>
</xs:schema>
+1 -1
View File
@@ -4,7 +4,7 @@
<Time>0</Time>
<Play>false</Play>
<Reverse>false</Reverse>
<Speed>0</Speed>
<Speed>1</Speed>
<Loop>true</Loop>
<Additive>false</Additive>
</Animation>
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Camera xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Camera.xsd">
<FOV>45</FOV>
<FOV>59</FOV> <!-- 90 horizontal FOV at 1080p -->
<NearClip>0.01</NearClip>
<FarClip>5000</FarClip>
</Camera>
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<ConfigBtnFloat xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ConfigBtnFloat.xsd">
<Header></Header>
<Field></Field>
<PressValue></PressValue>
</ConfigBtnFloat>
@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="types">
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
<xs:element name="ConfigBtnFloat">
<xs:annotation><xs:documentation>Used with a Button component, this button will change a variable in the config file.</xs:documentation></xs:annotation>
<xs:complexType>
<xs:all>
<xs:element name="Header" type="t:string" minOccurs="0">
<xs:annotation><xs:documentation>The header of the section in config.</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="Field" type="t:string" minOccurs="0">
<xs:annotation><xs:documentation>The name of the field to be changed in the config.</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="PressValue" type="t:float" minOccurs="0">
<xs:annotation><xs:documentation>The value to give the field.</xs:documentation></xs:annotation>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
</xs:schema>
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<ConfigBtnResolution xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ConfigBtnResolution.xsd">
<Header></Header>
<Field></Field>
<PressValue></PressValue>
</ConfigBtnResolution>
@@ -0,0 +1,17 @@
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="types">
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
<xs:element name="ConfigBtnResolution">
<xs:annotation><xs:documentation>Used with a Button component, this button will change a variable in the config file.</xs:documentation></xs:annotation>
<xs:complexType>
<xs:all>
<xs:element name="Width" type="t:int" minOccurs="0">
<xs:annotation><xs:documentation>Value of the resolution width.</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="Height" type="t:int" minOccurs="0">
<xs:annotation><xs:documentation>Value of the resolution height.</xs:documentation></xs:annotation>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
</xs:schema>
@@ -3,6 +3,8 @@
<ExplosionOrigin X="0" Y="0" Z="0"/>
<TimeSinceDeath>0</TimeSinceDeath>
<ExplosionDuration>2</ExplosionDuration>
<Speed>1</Speed>
<Delay>0</Delay>
<!--<Gravity>1</Gravity>-->
<!--<GravityForce>1</GravityForce>-->
<!--<ObjectRadius>2</ObjectRadius>-->
@@ -18,6 +18,8 @@
<xs:element name="ExplosionDuration" type="t:double" minOccurs="0">
<xs:annotation><xs:documentation>How many seconds the death animation should be</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="Speed" type="t:double" minOccurs="0"/>
<xs:element name="Delay" type="t:double" minOccurs="0"/>
<!--<xs:element name="Gravity" type="t:bool" minOccurs="0">
<xs:annotation><xs:documentation>Enable/disable gravity</xs:documentation></xs:annotation>
</xs:element>-->
+2 -1
View File
@@ -8,5 +8,6 @@
<NormalMap>true</NormalMap>
<SpecularMap>true</SpecularMap>
<GlowMap>true</GlowMap>
<GlowIntensity>3.0</GlowIntensity>
<Shadow>true</Shadow>
<GlowIntensity>1.0</GlowIntensity>
</Model>
+3
View File
@@ -36,6 +36,9 @@
<xs:element name="GlowIntensity" type="t:double" minOccurs="0">
<xs:annotation><xs:documentation>Intensity of the glow map</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="Shadow" type="t:bool" minOccurs="0">
<xs:annotation><xs:documentation>Whether the object cast/recieve shadows or not</xs:documentation></xs:annotation>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<NetworkComponent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="NetworkComponent.xsd">
</NetworkComponent>
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="types">
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
<xs:element name="NetworkComponent">
<xs:annotation>
<xs:documentation>If an entity has this component, it will be broadcasted to clients in a snapshot.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:schema>
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<ServerIdentity xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ServerIdentity.xsd">
<IP>123.123.123.123</IP>
<Port>65999</Port>
<ServerName>UnkownServer</ServerName>
<PlayersConnected>0</PlayersConnected>
</ServerIdentity>
@@ -0,0 +1,23 @@
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="types">
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
<xs:element name="ServerIdentity">
<xs:annotation><xs:documentation>A component for tracking the data of servers in the serverlist.</xs:documentation></xs:annotation>
<xs:complexType>
<xs:all>
<xs:element name="IP" type="t:string" minOccurs="0">
<xs:annotation><xs:documentation>The IP adress of the server.</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="Port" type="t:int" minOccurs="0">
<xs:annotation><xs:documentation>Port used to connect to the server.</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="ServerName" type="t:string" minOccurs="0">
<xs:annotation><xs:documentation>Name of the server.</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="PlayersConnected" type="t:int" minOccurs="0">
<xs:annotation><xs:documentation>Amount of players connected to the server.</xs:documentation></xs:annotation>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
</xs:schema>
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<ServerList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ServerList.xsd">
<TotalIdentities>0</TotalIdentities>
<NextPosition>0</NextPosition>
<Offset X="0.0" Y="0.0" Z="0.0"/>
</ServerList>
@@ -0,0 +1,20 @@
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="types">
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
<xs:element name="ServerList">
<xs:annotation><xs:documentation>The menulist where servers will be listed.</xs:documentation></xs:annotation>
<xs:complexType>
<xs:all>
<xs:element name="TotalIdentities" type="t:int" minOccurs="0">
<xs:annotation><xs:documentation>The amount of server identities in this list.</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="NextPosition" type="t:int" minOccurs="0">
<xs:annotation><xs:documentation>Where the next serverIdentity should be placed.</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="Offset" type="t:Vector" minOccurs="0">
<xs:annotation><xs:documentation>How much offset should be applied per position</xs:documentation></xs:annotation>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
</xs:schema>
+2 -2
View File
@@ -4,7 +4,7 @@
<Gain>1.0</Gain>
<Pitch>1.0</Pitch>
<Loop>false</Loop>
<MaxDistance>20.0</MaxDistance>
<RollOffFactor>1.0</RollOffFactor>
<MaxDistance>220.0</MaxDistance>
<RollOffFactor>10</RollOffFactor>
<ReferenceDistance>1.0</ReferenceDistance>
</SoundEmitter>
+6
View File
@@ -1,8 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Sprite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Sprite.xsd">
<Model>Models/Core/UnitQuad.mesh</Model>
<DiffuseTexture></DiffuseTexture>
<GlowMap></GlowMap>
<Color R="1" G="1" B="1" A="1"/>
<Visible>true</Visible>
<DepthSort>true</DepthSort>
<KeepRatioX>false</KeepRatioX>
<KeepRatioY>false</KeepRatioY>
<KeepRatio>false</KeepRatio>
<Linear>true</Linear>
<BlurBackground>false</BlurBackground>
</Sprite>
+21 -3
View File
@@ -9,14 +9,17 @@
</xs:annotation>
<xs:complexType>
<xs:all>
<xs:element name="Model" type="t:string" minOccurs="0">
<xs:annotation><xs:documentation>The model the sprite will use.</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="DiffuseTexture" type="t:string" minOccurs="0">
<xs:annotation><xs:documentation>Diffuse Texture file</xs:documentation></xs:annotation>
<xs:annotation><xs:documentation>Diffuse Texture file.</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="GlowMap" type="t:string" minOccurs="0">
<xs:annotation><xs:documentation>GlowMap file</xs:documentation></xs:annotation>
<xs:annotation><xs:documentation>GlowMap file.</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="Color" type="t:Color" minOccurs="0">
<xs:annotation><xs:documentation>Color tint</xs:documentation></xs:annotation>
<xs:annotation><xs:documentation>Color tint.</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="Visible" type="t:bool" minOccurs="0">
<xs:annotation><xs:documentation>Whether the model is visible or not</xs:documentation></xs:annotation>
@@ -24,6 +27,21 @@
<xs:element name="DepthSort" type="t:bool" minOccurs="0">
<xs:annotation><xs:documentation>Whether the sprite should be sorted with depth or not. Only use false for textures that are on HUD</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="KeepRatioX" type="t:bool" minOccurs="0">
<xs:annotation><xs:documentation>Wether the sprite should repeat in x instead of stretch when scaled.</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="KeepRatioY" type="t:bool" minOccurs="0">
<xs:annotation><xs:documentation>Wether the sprite should repeat in y instead of stretch when scaled.</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="KeepRatio" type="t:bool" minOccurs="0">
<xs:annotation><xs:documentation>Keep a 1:1 ratio between X and Y.</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="Linear" type="t:bool" minOccurs="0">
<xs:annotation><xs:documentation>If it should use Linear or Nearest sampling method.</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="BlurBackground" type="t:bool" minOccurs="0">
<xs:annotation><xs:documentation>Wether the background should be blurred begind this sprite.</xs:documentation></xs:annotation>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
-98
View File
@@ -1,98 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="AmmunitionHUD" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:AmmunitionHUD/>
<c:Transform>
<Position X="-0.0430000015" Y="0.131501317" Z="-0.0670000017"/>
<Scale X="0.400000006" Y="0.400000006" Z="0.400000006"/>
</c:Transform>
</Components>
<Children>
<Entity name="AmmunitionHUDBackground">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<Color A="0.588235319" B="0" G="0" R="0"/>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="-0.00200000009"/>
<Scale X="0.119999997" Y="0.119999997" Z="0.119999997"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="MagazineAmmo">
<Components>
<c:Text>
<Content>0</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:Transform>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Ammo">
<Components>
<c:Text>
<Content>360</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:Transform>
<Position X="5.2833886e-05" Y="-0.0407950208" Z="0"/>
<Scale X="0.0399999991" Y="0.0399999991" Z="0.0399999991"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity>
<Components>
<c:Transform>
<Position X="-0.00200000009" Y="0.00400000019" Z="-0.00100000005"/>
</c:Transform>
</Components>
<Children>
<Entity name="MagazineAmmo">
<Components>
<c:Text>
<Content>0</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="0" G="0" R="0"/>
</c:Text>
<c:Transform>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Ammo">
<Components>
<c:Text>
<Content>360</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="0" G="0" R="0"/>
</c:Text>
<c:Transform>
<Position X="5.2833886e-05" Y="-0.0407950208" Z="0"/>
<Scale X="0.0399999991" Y="0.0399999991" Z="0.0399999991"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
+12 -6
View File
@@ -3,19 +3,25 @@
<Components>
<c:AmmoPickup/>
<c:Model>
<Resource>Models/Props/PickUps/AmmoPickUp.mesh</Resource>
</c:Model>
<c:Trigger/>
<c:RaptorCopter>
<Speed>8</Speed>
<Axis X="0" Y="0.100000001" Z="0"/>
</c:RaptorCopter>
<c:Model>
<Resource>Models/Props/PickUps/AmmoPickUp.mesh</Resource>
</c:Model>
<c:NetworkComponent/>
<c:PointLight>
<Color A="1" B="1" G="0.0823529437" R="1"/>
<Radius>1.5</Radius>
<Intensity>3</Intensity>
</c:PointLight>
<c:Transform>
<Position X="0" Y="2.36784196" Z="0"/>
<Position X="0" Y="2.36784196" Z="-0.0281207096"/>
<Orientation X="0" Y="18843.5469" Z="0"/>
<Scale X="0.600000024" Y="0.600000024" Z="0.600000024"/>
<Orientation X="0" Y="18717.9453" Z="0"/>
</c:Transform>
<c:Trigger/>
</Components>
<Children/>
@@ -1,46 +1,102 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="PrimaryBlendTree" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Entity name="Hands" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Blend>
<Pose1>Idle</Pose1>
<Pose2>WeaponAction</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:BlendAdditive>
<Adder>MovementBlend</Adder>
<Receiver>FinalBlend</Receiver>
</c:BlendAdditive>
<c:Model>
<Resource>Models/Characters/Assault/FirstPersonAssaultBlue.mesh</Resource>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="WeaponAction">
<Entity name="FinalBlend">
<Components>
<c:Blend>
<Pose1>Fire</Pose1>
<Pose2>Reload</Pose2>
<Weight>1</Weight>
<Pose1>BlendTreeAssaultWeapon</Pose1>
<Pose2>BlendTreeSecondaryWeapon</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Fire">
<Entity name="BlendTreeAssaultWeapon">
<Components>
<c:Blend>
<Pose1>Fire</Pose1>
<Pose2>Reload</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Reload">
<Components>
<c:Animation>
<AnimationName>ReloadSwitchF</AnimationName>
<Speed>0.5</Speed>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Fire">
<Components>
<c:Animation>
<AnimationName>ShootRifleF</AnimationName>
<Speed>1</Speed>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="BlendTreeSecondaryWeapon">
<Components>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="MovementBlend">
<Components>
<c:Blend>
<Pose1>Idle</Pose1>
<Pose2>Run</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Run">
<Components>
<c:Animation>
<AnimationName>ShootShotgunF</AnimationName>
<AnimationName>RunF</AnimationName>
<Speed>1</Speed>
<Play>true</Play>
<Loop>false</Loop>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Reload">
<Entity name="Idle">
<Components>
<c:Animation>
<AnimationName>ReloadSwitchF</AnimationName>
<Time>0.58991607886241582</Time>
<AnimationName>IdleF</AnimationName>
<Speed>1</Speed>
<Play>true</Play>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
@@ -48,17 +104,116 @@
</Entity>
</Children>
</Entity>
<Entity name="Idle">
<Entity name="ViewModel">
<Components>
<c:Animation>
<AnimationName>IdleF</AnimationName>
<Time>0.14837891922093149</Time>
<Speed>1</Speed>
<Play>true</Play>
</c:Animation>
<c:Transform/>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Model>
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="0.120748274" Y="-0.228437141" Z="-0.181454718"/>
<Orientation X="0.0104048206" Y="-0.00268219248" Z="0.0428443849"/>
</c:Transform>
</Components>
<Children/>
<Children>
<Entity name="WeaponMuzzle">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/RayBlue.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.00800000038" Y="0.0920000076" Z="-0.416000009"/>
<Orientation X="6.2760005" Y="0.00500000035" Z="0.00600000005"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="ReloadSpawner">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/WeaponAssaultReloadEffectView.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="AmmoHUD">
<Components>
<c:BoneAttachment>
<BoneName>R_Ammo_Joint</BoneName>
<ScaleOffset X="0.5" Y="0.5" Z="1"/>
<InheritScale>true</InheritScale>
</c:BoneAttachment>
<c:Transform>
<Position X="0.0540266186" Y="-0.0954354703" Z="-0.255526125"/>
<Orientation X="0.000684258412" Y="0.077423811" Z="0.00118651299"/>
<Scale X="0.50000006" Y="0.500000477" Z="1.00000083"/>
</c:Transform>
</Components>
<Children>
<Entity name="Background">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<GlowMap></GlowMap>
<Color A="0.588235319" B="0" G="0" R="0"/>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="-0.00200000009"/>
<Scale X="0.119999997" Y="0.119999997" Z="0.119999997"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Text">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="MagazineAmmo">
<Components>
<c:Text>
<Content>32</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:TextFieldReader>
<ParentEntityName>PlayerAssault</ParentEntityName>
<ComponentType>AssaultWeapon</ComponentType>
<Field>MagazineAmmo</Field>
</c:TextFieldReader>
<c:Transform>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Ammo">
<Components>
<c:Text>
<Content>320</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:TextFieldReader>
<ParentEntityName>PlayerAssault</ParentEntityName>
<ComponentType>AssaultWeapon</ComponentType>
<Field>Ammo</Field>
</c:TextFieldReader>
<c:Transform>
<Position X="5.2833886e-05" Y="-0.0407950208" Z="0"/>
<Scale X="0.0399999991" Y="0.0399999991" Z="0.0399999991"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
@@ -0,0 +1,159 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="Hands" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:BlendAdditive>
<Adder>MovementBlend</Adder>
<Receiver>FinalBlend</Receiver>
</c:BlendAdditive>
<c:Model>
<Resource>Models/Characters/Defender/FirstPersonDefenderBlue.mesh</Resource>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="FinalBlend">
<Components>
<c:Blend>
<Pose1>BlendTreeDefenderWeapon</Pose1>
<Pose2>BlendTreeSecondaryWeapon</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="BlendTreeDefenderWeapon">
<Components>
<c:Blend>
<Pose1>ActionBlend</Pose1>
<Pose2>Shield</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Shield">
<Components>
<c:Animation>
<AnimationName>ActivateDeactiveShieldF</AnimationName>
<Time>1</Time>
<Speed>1</Speed>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="ActionBlend">
<Components>
<c:Blend>
<Pose1>Idle</Pose1>
<Pose2>ActionBlend2</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Idle">
<Components>
<c:Animation>
<AnimationName>IdleF</AnimationName>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="ActionBlend2">
<Components>
<c:Blend>
<Pose1>Fire</Pose1>
<Pose2>Reload</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Fire">
<Components>
<c:Animation>
<AnimationName>ShootShotgunF</AnimationName>
<Time>0.5</Time>
<Speed>1</Speed>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Reload">
<Components>
<c:Animation>
<AnimationName>ShotgunReloadTwoF</AnimationName>
<Time>0.23333333432674408</Time>
<Speed>1</Speed>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="BlendTreeSecondaryWeapon">
<Components>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="MovementBlend">
<Components>
<c:Blend>
<Pose1>Idle</Pose1>
<Pose2>Run</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Run">
<Components>
<c:Animation>
<AnimationName>RunF</AnimationName>
<Time>0.93061516164344571</Time>
<Speed>1</Speed>
<Play>true</Play>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Idle">
<Components>
<c:Animation>
<AnimationName>IdleF</AnimationName>
<Time>0.11396167157691739</Time>
<Speed>1</Speed>
<Play>true</Play>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
-19
View File
@@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Model>
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="0.136586398" Y="0.92942369" Z="-0.139760047"/>
<Orientation X="-0.601206124" Y="0.132410824" Z="-0.129014626"/>
</c:Transform>
</Components>
<Children/>
</Entity>
-22
View File
@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="R_Leg_Top" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:BoneAttachment>
<BoneName>R_Leg_Top</BoneName>
<ScaleOffset X="0.200000003" Y="0.200000003" Z="0.200000003"/>
</c:BoneAttachment>
<c:Model>
<Resource>Models/Core/UnitCube.mesh</Resource>
<Color A="1" B="1" G="19.6078434" R="1"/>
</c:Model>
<c:Transform>
<Position X="0.0664939061" Y="0.714353919" Z="0.0475388765"/>
<Scale X="0.100000001" Y="0.100000001" Z="0.100000001"/>
<Orientation X="-0.783109188" Y="-0.0050998251" Z="3.14151597"/>
</c:Transform>
</Components>
<Children/>
</Entity>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -13,38 +13,8 @@
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<Color A="0.300000012" B="1" G="1" R="1"/>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0.919596612" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity name="ProgressionHexagon">
<Components>
<c:CapturePointHUD>
<CapturePointNumber>2</CapturePointNumber>
</c:CapturePointHUD>
<c:Fill>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Fill>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
<Orientation X="0" Y="0" Z="1.57079637"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="BackgroundHexagon">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<GlowMap></GlowMap>
<DepthSort>false</DepthSort>
<Color A="0.300000012" B="1" G="1" R="1"/>
</c:Sprite>
<c:Transform>
@@ -54,20 +24,21 @@
<Children>
<Entity name="ProgressionHexagon">
<Components>
<c:Fill>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Fill>
<c:CapturePointHUD>
<CapturePointNumber>3</CapturePointNumber>
</c:CapturePointHUD>
<c:Fill>
<Percentage>0.80222018197612788</Percentage>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Fill>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
<GlowMap></GlowMap>
<DepthSort>false</DepthSort>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
<Orientation X="0" Y="0" Z="1.57079637"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
</c:Transform>
</Components>
<Children/>
@@ -78,6 +49,8 @@
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<GlowMap></GlowMap>
<DepthSort>false</DepthSort>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Sprite>
<c:Transform>
@@ -87,19 +60,21 @@
<Children>
<Entity name="ProgressionHexagon">
<Components>
<c:CapturePointHUD>
<CapturePointNumber>4</CapturePointNumber>
</c:CapturePointHUD>
<c:Fill>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Fill>
<c:CapturePointHUD>
<CapturePointNumber>4</CapturePointNumber>
</c:CapturePointHUD>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
<GlowMap></GlowMap>
<DepthSort>false</DepthSort>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
<Orientation X="0" Y="0" Z="1.57079637"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
</c:Transform>
</Components>
<Children/>
@@ -110,6 +85,44 @@
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<GlowMap></GlowMap>
<DepthSort>false</DepthSort>
<Color A="0.300000012" B="1" G="1" R="1"/>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0.919596612" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity name="ProgressionHexagon">
<Components>
<c:Fill>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Fill>
<c:CapturePointHUD>
<CapturePointNumber>2</CapturePointNumber>
</c:CapturePointHUD>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
<GlowMap></GlowMap>
<DepthSort>false</DepthSort>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/>
<Orientation X="0" Y="0" Z="1.57079637"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="BackgroundHexagon">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<GlowMap></GlowMap>
<DepthSort>false</DepthSort>
<Color A="0.300000012" B="1" G="1" R="1"/>
</c:Sprite>
<c:Transform>
@@ -119,19 +132,21 @@
<Children>
<Entity name="ProgressionHexagon">
<Components>
<c:CapturePointHUD>
<CapturePointNumber>1</CapturePointNumber>
</c:CapturePointHUD>
<c:Fill>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Fill>
<c:CapturePointHUD>
<CapturePointNumber>1</CapturePointNumber>
</c:CapturePointHUD>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
<GlowMap></GlowMap>
<DepthSort>false</DepthSort>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
<Orientation X="0" Y="0" Z="1.57079637"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
</c:Transform>
</Components>
<Children/>
@@ -142,7 +157,9 @@
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<Color A="0.699999988" B="0" G="0.200000003" R="1"/>
<GlowMap></GlowMap>
<DepthSort>false</DepthSort>
<Color A="0.699999988" B="0" G="0" R="1"/>
</c:Sprite>
<c:Transform>
<Position X="-1.58304751" Y="0.919596612" Z="0"/>
@@ -151,17 +168,19 @@
<Children>
<Entity name="ProgressionHexagon">
<Components>
<c:CapturePointHUD/>
<c:Fill>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Fill>
<c:CapturePointHUD/>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
<GlowMap></GlowMap>
<DepthSort>false</DepthSort>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
<Orientation X="0" Y="0" Z="1.57079637"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
</c:Transform>
</Components>
<Children/>
+3 -8
View File
@@ -2,17 +2,12 @@
<Entity name="DashEffect" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Animation/>
<c:Lifetime>
<Lifetime>0.5</Lifetime>
</c:Lifetime>
<c:ExplosionEffect>
<Velocity X="0" Y="0" Z="0"/>
<TimeSinceDeath>0</TimeSinceDeath>
<ExplosionDuration>0.5</ExplosionDuration>
<EndColor A="0" B="0" G="0" R="0"/>
</c:ExplosionEffect>
<c:Model/>
<c:Transform/>
</Components>
<Children/>
</Entity>
-255
View File
@@ -1,255 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="Player" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:AABB>
<Origin X="0" Y="0.772000015" Z="0"/>
<Size X="1" Y="1.60000002" Z="1"/>
</c:AABB>
<c:AssaultWeapon>
<RPM>600</RPM>
</c:AssaultWeapon>
<c:Collidable/>
<c:DashAbility/>
<c:Health/>
<c:Physics>
<Velocity X="2.30999646e-23" Y="0" Z="1.05272533e-23"/>
</c:Physics>
<c:Player>
<MovementSpeed>5</MovementSpeed>
</c:Player>
<c:Team>
<Team>
<Red/>
</Team>
</c:Team>
<c:Transform>
<Position X="0" Y="0.0288832653" Z="2.64837074"/>
</c:Transform>
</Components>
<Children>
<Entity name="Camera">
<Components>
<c:Camera/>
<c:Transform>
<Position X="0" Y="1.27700007" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity name="PlayerName">
<Components>
<c:Text>
<Resource>Fonts/DroidSans.ttf,100</Resource>
<Color A="1" B="0" G="1" R="0"/>
</c:Text>
<c:Transform>
<Position X="0.100000001" Y="0.248000011" Z="-0.248000011"/>
<Scale X="0.100000001" Y="0.113000005" Z="0.5"/>
<Orientation X="0" Y="3.14199996" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="CameraModel">
<Components>
<c:Model>
<Resource>Models/Widgets/Camera.mesh</Resource>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="0" Y="0.0331346765" Z="-0.0792061687"/>
<Scale X="1.30000007" Y="1.50000012" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="HUD">
<Components>
<c:Transform>
<Position X="0" Y="0" Z="-0.5"/>
</c:Transform>
</Components>
<Children>
<Entity name="HealthBar">
<Components>
<c:Fill>
<Percentage>1</Percentage>
<Color A="0" B="1" G="0" R="0"/>
</c:Fill>
<c:HealthHUD/>
<c:Model>
<Resource>Models/Core/UnitHexagon.mesh</Resource>
<Color A="1" B="0.70588237" G="0.70588237" R="0.70588237"/>
</c:Model>
<c:Transform>
<Position X="-0.383000016" Y="-0.185000002" Z="0"/>
<Scale X="0.150000006" Y="0.150000006" Z="0.150000006"/>
<Orientation X="0" Y="0.594000041" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Crosshair">
<Components>
<c:Sprite>
<DiffuseTexture>Textures/Weapons/Crosshair/SmallThickHoleDot.png</DiffuseTexture>
<DepthSort>false</DepthSort>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.200000003"/>
<Scale X="0.0250000004" Y="0.0250000004" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="Hands">
<Components>
<c:Animation>
<AnimationName1>Idle</AnimationName1>
<Time1>0.28963486380924053</Time1>
<Speed1>1</Speed1>
</c:Animation>
<c:Model>
<Resource>Models/Characters/Assault/FirstPerson.mesh</Resource>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="WeaponModel">
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Model>
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
<Transparent>true</Transparent>
</c:Model>
<c:Transform>
<Position X="0.120430455" Y="-0.231800437" Z="-0.181454748"/>
<Orientation X="0.0104047749" Y="-0.00268166233" Z="0.042844031"/>
</c:Transform>
</Components>
<Children>
<Entity name="WeaponMuzzle">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/RayBlue.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.00325386273" Y="0.0970000029" Z="-0.843000054"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="FirstPersonReloadSpawner">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/WeaponReloadEffect.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="ThirdPersonCamera">
<Components>
<c:Camera/>
<c:Model>
<Resource>Models/Widgets/Camera.mesh</Resource>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="-0.284000009" Y="1.83800006" Z="1.18900001"/>
<Orientation X="5.95600033" Y="0" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="PlayerModel">
<Components>
<c:Animation>
<AnimationName1>Idle</AnimationName1>
<Time1>0.42156525436696768</Time1>
<Speed1>1</Speed1>
</c:Animation>
<c:AnimationOffset>
<AnimationName>AimRifle</AnimationName>
<Time>0.5</Time>
</c:AnimationOffset>
<c:HiddenForLocalPlayer/>
<c:Model>
<Resource>Models/Characters/Assault/AssaultAnimations.mesh</Resource>
<Color A="1" B="0" G="0" R="1"/>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="ThirdPersonWeaponModel">
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Model>
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="0.160716802" Y="1.02800739" Z="-0.215931982"/>
<Orientation X="-0.0627654716" Y="-0.0450839326" Z="0.119217664"/>
</c:Transform>
</Components>
<Children>
<Entity name="ThirdPersonWeaponMuzzle">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/RayBlue.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.00644115033" Y="0.096679531" Z="-0.436609417"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="AABBStanding">
<Components>
<c:Model>
<Resource>Models/Core/UnitCube.mesh</Resource>
<Color A="0.427450985" B="1" G="1" R="1"/>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="0" Y="0.772000015" Z="0"/>
<Scale X="1" Y="1.60000002" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="AABBCrouching">
<Components>
<c:Model>
<Resource>Models/Core/UnitCube.mesh</Resource>
<Color A="0.745098054" B="1" G="0" R="1"/>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="0" Y="0.772000015" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
-57
View File
@@ -1,57 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="Wave" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Animation>
<AnimationName1>Run</AnimationName1>
<Weight1>0.5</Weight1>
<Time1>0.97312056690160276</Time1>
<Speed1>1</Speed1>
<Speed2>1</Speed2>
<AnimationName2>ReloadSwitch</AnimationName2>
<Time2>0.91310356788604263</Time2>
<AnimationName3>LeftRight</AnimationName3>
<Weight3>0</Weight3>
<Time3>0.040207288496060478</Time3>
<Speed3>1</Speed3>
</c:Animation>
<c:AnimationOffset>
<AnimationName>DownUp</AnimationName>
<Time>0.77999961376190186</Time>
</c:AnimationOffset>
<c:Model>
<Resource>Models/Characters/Assault/FirstPerson.mesh</Resource>
<Color A="0.627451003" B="19.6078434" G="1" R="3.92156863"/>
<Transparent>true</Transparent>
</c:Model>
<c:Transform>
<Position X="-0.690088332" Y="1.00491476" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Model>
<Resource>Models/Weapons/Blue/AssaultWeapon.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="0.120778561" Y="-0.223796993" Z="-0.15143311"/>
<Orientation X="0.0957378224" Y="0.0132024018" Z="0.0284451656"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:Camera/>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Collidable/>
<c:Model>
<Resource>Models/Props/Bridges/SciFi_Bridge_Support_Top_Red.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="0" Y="-6.44986534" Z="-6.68222857"/>
<Scale X="1.10000002" Y="1.10000002" Z="1.10000002"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:Collidable/>
<c:Model>
<Resource>Models/Props/Bridges/SciFi_Bridge_Support_Bot_Red.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="0" Y="0.215699792" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:FloatingEffect>
<Period>12</Period>
<Time>513.93462028501312</Time>
<Axis X="0" Y="0.100000001" Z="0"/>
</c:FloatingEffect>
<c:Transform>
<Position X="-0" Y="-0.0882625133" Z="-0"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:Collidable/>
<c:Model>
<Resource>Models/Props/Bridges/SciFi_Bridge_Support_Middle_Red.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="0" Y="0.121641584" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
@@ -0,0 +1,169 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="Origin" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="Anchor1">
<Components>
<c:RaptorCopter>
<Speed>0.30000001192092896</Speed>
<Axis X="0" Y="1" Z="0"/>
</c:RaptorCopter>
<c:FloatingEffect>
<Period>30</Period>
<Time>342.91836260588383</Time>
<Axis X="0" Y="1" Z="0"/>
<Amplitude>3.5</Amplitude>
</c:FloatingEffect>
<c:Transform>
<Position X="0" Y="1.47803104" Z="0"/>
<Orientation X="0" Y="220.263962" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:Model>
<Resource>Models/Props/CapturePoint/CrystalsLayer1.mesh</Resource>
<Color A="1" B="1" G="0.392156869" R="0"/>
<Shadow>false</Shadow>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="Anchor2">
<Components>
<c:RaptorCopter>
<Speed>0.5</Speed>
<Axis X="0" Y="1" Z="0"/>
</c:RaptorCopter>
<c:FloatingEffect>
<Period>20</Period>
<Time>448.85134971162591</Time>
<Axis X="0" Y="1" Z="0"/>
<Amplitude>3</Amplitude>
</c:FloatingEffect>
<c:Transform>
<Position X="0" Y="1.05921149" Z="0"/>
<Orientation X="0" Y="360.699402" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:Model>
<Resource>Models/Props/CapturePoint/CrystalsLayer2.mesh</Resource>
<Color A="1" B="1" G="0.392156869" R="0"/>
<Shadow>false</Shadow>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="Anchor0">
<Components>
<c:RaptorCopter>
<Speed>0.10000000149011612</Speed>
<Axis X="0" Y="-1" Z="0"/>
</c:RaptorCopter>
<c:FloatingEffect>
<Period>10</Period>
<Time>495.36799589902654</Time>
<Axis X="0" Y="1" Z="0"/>
<Amplitude>0.5</Amplitude>
</c:FloatingEffect>
<c:Transform>
<Position X="-0" Y="-0.11458683" Z="-0"/>
<Orientation X="0" Y="-68.9721527" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:Model>
<Resource>Models/Props/CapturePoint/CenterCrystal.mesh</Resource>
<Color A="1" B="1" G="0.392156869" R="0"/>
<Shadow>false</Shadow>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="LightOrigin1">
<Components>
<c:RaptorCopter>
<Speed>1</Speed>
<Axis X="0.400000006" Y="1" Z="0"/>
</c:RaptorCopter>
<c:Transform>
<Orientation X="16.781414" Y="41.9535484" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:PointLight>
<Color A="1" B="1" G="0.588235319" R="0"/>
<Radius>4.5</Radius>
<Falloff>0.5</Falloff>
</c:PointLight>
<c:Transform>
<Position X="1.1234858" Y="0.720658064" Z="3.40589333"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:PointLight>
<Color A="1" B="1" G="0.588235319" R="0"/>
<Radius>4.5</Radius>
<Falloff>0.5</Falloff>
</c:PointLight>
<c:Transform>
<Position X="0.4723185" Y="0" Z="-4.12240839"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:PointLight>
<Color A="1" B="1" G="0.588235319" R="0"/>
<Radius>4.5</Radius>
<Falloff>0.5</Falloff>
</c:PointLight>
<c:Transform>
<Position X="-2.91954184" Y="1.54033804" Z="-0.0577439293"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:PointLight>
<Color A="1" B="1" G="0.588235319" R="0"/>
<Radius>4.5</Radius>
<Falloff>0.5</Falloff>
</c:PointLight>
<c:Transform>
<Position X="1.48998797" Y="-3.06706786" Z="-1.78805089"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>

Some files were not shown because too many files have changed in this diff Show More