#include <MultiplayerGameMode.h>
◆ AMultiplayerGameMode()
| AMultiplayerGameMode::AMultiplayerGameMode |
( |
| ) |
|
◆ AddDeathToKillFeed()
| void AMultiplayerGameMode::AddDeathToKillFeed |
( |
const FPlayerDeath & | PlayerDeath, |
|
|
const bool | bPlayerDeath = true ) |
709{
713 return;
715 {
717 if(CustomPlayerController != nullptr)
718 {
720 }
721 }
722}
Definition CustomPlayerController.h:24
void ClientAddDeathToKillFeed(FPlayerDeath PlayerDeath, bool bPlayerDeath=true)
class AMultiplayerGameState * MultiplayerGameState
Replaced with Parent = UpdateGameState();.
Definition MultiplayerGameMode.h:106
bool bShowDeathsInFeed
Definition MultiplayerGameMode.h:172
virtual void ClientAddDeathToKillFeed(FPlayerDeath PlayerDeath, bool bPlayerDeath)
TArray< APlayerController * > AllPlayerControllers
Definition OnlineGameMode.h:57
◆ AddDeathToPlayer()
| void AMultiplayerGameMode::AddDeathToPlayer |
( |
APlayerState * | Player, |
|
|
const bool | bSelfKill = false ) |
|
protectedvirtual |
690{
692 if(CustomVictimPlayerState != nullptr)
693 {
696 if(bSelfKill)
697 {
699 }
701 {
704 }
705 }
706}
int32 PlayerLifePool
Definition MultiplayerGameMode.h:133
int32 RespawnTime
Definition OnlineGameMode.h:109
int32 SelfDeathRespawnTimeMultiplier
Definition OnlineGameMode.h:111
virtual void SpawnPlayer(APlayerController *PlayerController)
Definition OnlineGameMode.cpp:266
FMultiplayerPlayerStats AddDeath()
Definition BaseData.h:1223
◆ AddScoreToPlayer()
| void AMultiplayerGameMode::AddScoreToPlayer |
( |
APlayerState * | Player, |
|
|
const bool | bTeamKill = false, |
|
|
const bool | bSelfKill = false ) |
|
protectedvirtual |
664{
665 if(Player == nullptr){return;}
667 if(CustomPlayerState != nullptr)
668 {
669 if(!bSelfKill && !bTeamKill)
670 {
673 }
675 {
679 }
681 {
685 }
686 }
687}
int32 SelfKillPenaltyTime
Definition MultiplayerGameMode.h:169
bool bSelfKillPenalty
Definition MultiplayerGameMode.h:167
bool bTeamKillPenalty
Definition MultiplayerGameMode.h:163
float TeamKilledXP
Definition MultiplayerGameMode.h:122
float PlayerKilledXP
Definition MultiplayerGameMode.h:120
int32 TeamKillPenaltyTime
Definition MultiplayerGameMode.h:165
float SelfKilledXP
Definition MultiplayerGameMode.h:124
FMultiplayerPlayerStats AddKill()
Definition BaseData.h:1207
FMultiplayerPlayerStats AddSelfKill()
Definition BaseData.h:1217
FMultiplayerPlayerStats AddTeamKill()
Definition BaseData.h:1212
FMultiplayerPlayerStats AddXP(const float Amount)
Definition BaseData.h:1228
◆ AddScoreToTeam()
| void AMultiplayerGameMode::AddScoreToTeam |
( |
const int32 | TeamID, |
|
|
const int32 | ScoreToAdd ) |
|
protectedvirtual |
653{
654 const int32* PreviousAttackerScorePtr =
TeamScores.Find(TeamID);
655 int32 PreviousAttackerScore = 0;
656 if(PreviousAttackerScorePtr != nullptr)
657 {
658 PreviousAttackerScore = *PreviousAttackerScorePtr;
659 }
660 TeamScores.Add(TeamID, (PreviousAttackerScore + ScoreToAdd));
661}
TMap< int32, int32 > TeamScores
Definition OnlineGameMode.h:99
◆ BeginPlay()
| void AMultiplayerGameMode::BeginPlay |
( |
| ) |
|
|
overridevirtual |
In Parent
Reimplemented from AOnlineGameMode.
Reimplemented in AMultiplayerHordeGameMode.
29{
30 Super::BeginPlay();
33 {
36 }
37
39 if(
MultiplayerGameState ==
nullptr){UE_LOG(LogCustomALSGameMode,
Error,TEXT(
"Game State Missing in Multiplayer Game Mode"));}
40
42
43
44
45
46
47
48
49}
int32 RoundTimeMax
Definition MultiplayerGameMode.h:147
int32 RoundTime
Definition MultiplayerGameMode.h:146
int32 ReadyMatchWaitTime
Definition OnlineGameMode.h:142
bool bDisableStartTimers
Definition OnlineGameMode.h:136
int32 PreMatchWaitTime
Definition OnlineGameMode.h:138
◆ EndMatch()
| void AMultiplayerGameMode::EndMatch |
( |
| ) |
|
|
overrideprotectedvirtual |
Condition Met to finish match
In Parent
Reimplemented from AOnlineGameMode.
254{
256
257
258
259
262
263 Super::EndMatch();
265
266
267
268
269
270
271
272
273 return;
274
276 {
277 if(PlayerState->GetPawn() != nullptr)
278 {
279 PlayerState->GetPawn()->GetMovementComponent()->StopMovementImmediately();
280 }
281
282
283
284
285
286 }
287}
FTimerHandle NextRoundTimerHandle
Definition MultiplayerGameMode.h:234
virtual void UpdateGameState() override
Definition MultiplayerGameMode.cpp:735
FTimerHandle RoundTimerHandle
Definition MultiplayerGameMode.h:233
◆ EndRound()
| void AMultiplayerGameMode::EndRound |
( |
| ) |
|
|
protectedvirtual |
Reimplemented in AMultiplayerHordeGameMode.
183{
192
193
194
195
198 {
200 }
202
203
204
205
206
207
208
209
210
212 {
213
214 }
215 else
216 {
218 }
219}
int32 MaxRounds
Definition MultiplayerGameMode.h:152
virtual void StartRound()
Definition MultiplayerGameMode.cpp:126
bool bRoundLimit
Definition MultiplayerGameMode.h:142
float TimeTillNextRound
Definition MultiplayerGameMode.h:154
int32 Round
Definition MultiplayerGameMode.h:144
FMatchState RoundMatchState
Definition MultiplayerGameMode.h:229
virtual void ResetEndRoundCondition()
Definition MultiplayerGameMode.h:218
virtual void EndMatch() override
Definition MultiplayerGameMode.cpp:253
bool bDebuggingMode
Definition OnlineGameMode.h:212
virtual bool GetIsMatchOver()
Definition OnlineGameMode.h:176
bool bLogMatchState
Definition OnlineGameMode.h:218
int32 RoundTimeRemaining
Definition BaseData.h:1094
EMatchState RoundState
Definition BaseData.h:1088
◆ GetCurrentRound()
| virtual int32 AMultiplayerGameMode::GetCurrentRound |
( |
| ) |
const |
|
inlinevirtual |
◆ MatchCountdown()
| void AMultiplayerGameMode::MatchCountdown |
( |
| ) |
|
|
overrideprotectedvirtual |
Loop while in Match
Reimplemented from AOnlineGameMode.
Reimplemented in AMultiplayerHordeGameMode.
223{
224 Super::MatchCountdown();
225
226
227
229 {
231 {
233 {
234 if(
bDebuggingMode){UE_LOG(LogCustomALSGameMode,
Warning,TEXT(
"AMultiplayerGameMode::MatchCountdown Team: %i WON, %i Points"),
Team.Key,
Team.Value);}
236 }
237 }
238 }
239
240
241
242
243
244
245
246
247
248
249
250
251}
int32 GoalScore
Definition MultiplayerGameMode.h:110
bool bEndOnTeamReachingGoal
Definition MultiplayerGameMode.h:129
virtual void SetEndMatchCondition()
Definition OnlineGameMode.h:174
◆ OnEndRound()
| void AMultiplayerGameMode::OnEndRound |
( |
| ) |
|
|
protected |
◆ OnRoundCountdown()
| void AMultiplayerGameMode::OnRoundCountdown |
( |
| ) |
|
|
protected |
◆ OnStartRound()
| void AMultiplayerGameMode::OnStartRound |
( |
| ) |
|
|
protected |
◆ PreMatch()
| void AMultiplayerGameMode::PreMatch |
( |
| ) |
|
|
overrideprotectedvirtual |
Waiting for everyone to load in
Reimplemented from AOnlineGameMode.
78{
79 Super::PreMatch();
80
81
82
83
84
85
86
87
88
89
90}
◆ ReadyMatch()
| void AMultiplayerGameMode::ReadyMatch |
( |
| ) |
|
|
overrideprotectedvirtual |
Everyone Ready to Start
Reimplemented from AOnlineGameMode.
94{
95 Super::ReadyMatch();
96}
◆ ResetEndRoundCondition()
| virtual void AMultiplayerGameMode::ResetEndRoundCondition |
( |
| ) |
|
|
inlineprotectedvirtual |
bool bEndRoundCondition
Definition MultiplayerGameMode.h:238
◆ RoundCountdown()
| void AMultiplayerGameMode::RoundCountdown |
( |
| ) |
|
|
protectedvirtual |
Use Update GameState?
144{
148 {
151
153 }
157 {
159 {
160
162 {
165 }
166 }
167 }
169 {
171 }
173 {
175 }
177 {
179 }
180}
virtual void EndRound()
Definition MultiplayerGameMode.cpp:182
virtual void SetEndRoundCondition()
Definition MultiplayerGameMode.h:216
bool bRoundsTimed
Definition MultiplayerGameMode.h:140
int32 RoundGoalScore
Definition MultiplayerGameMode.h:150
bool bEndRoundOnTeamReachingGoal
Definition MultiplayerGameMode.h:156
bool bLogMatchTime
Definition OnlineGameMode.h:216
◆ SetEndRoundCondition()
| virtual void AMultiplayerGameMode::SetEndRoundCondition |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ SpawnedAIDeath()
| void AMultiplayerGameMode::SpawnedAIDeath |
( |
FPlayerDeath & | PlayerDeath, |
|
|
APawn * | PawnThatDied ) |
|
overridevirtual |
In Parent
Reimplemented from AOnlineGameMode.
Reimplemented in AMultiplayerHordeGameMode.
577{
578 Super::SpawnedAIDeath(PlayerDeath, PawnThatDied);
582 {
584 }
586 {
588 }
590
591
592
594
595
596
597
598
599
600
601}
virtual void AddScoreToPlayer(APlayerState *Player, const bool bTeamKill=false, const bool bSelfKill=false)
Definition MultiplayerGameMode.cpp:663
bool bShowAIDeathInFeed
Definition MultiplayerGameMode.h:176
int32 AIKilledScore
Definition MultiplayerGameMode.h:116
int32 PlayerKilledScore
Definition MultiplayerGameMode.h:112
virtual void AddScoreToTeam(const int32 TeamID, const int32 ScoreToAdd)
Definition MultiplayerGameMode.cpp:652
void AddDeathToKillFeed(const FPlayerDeath &PlayerDeath, const bool bPlayerDeath=true)
Definition MultiplayerGameMode.cpp:708
bool bSelfDeath
Definition BaseData.h:646
int32 AttackerTeamID
Definition BaseData.h:631
class APlayerState * AttackerPlayerState
Definition BaseData.h:626
bool bTeamKill
Definition BaseData.h:648
◆ SpawnedPlayerDeath()
| void AMultiplayerGameMode::SpawnedPlayerDeath |
( |
FPlayerDeath & | PlayerDeath, |
|
|
APawn * | PawnThatDied ) |
|
overridevirtual |
In Parent
Reimplemented from AOnlineGameMode.
Reimplemented in AMultiplayerHordeGameMode.
555{
556 Super::SpawnedPlayerDeath(PlayerDeath, PawnThatDied);
559 {
561 {
563 }
564 else
565 {
566 PointsToAdd = 0;
567 }
568 }
571
574}
virtual void AddDeathToPlayer(APlayerState *Player, const bool bSelfKill=false)
Definition MultiplayerGameMode.cpp:689
bool bShowPlayerDeathsInFeed
Definition MultiplayerGameMode.h:174
int32 TeamKillScore
Definition MultiplayerGameMode.h:114
class APlayerState * VictimPlayerState
Definition BaseData.h:628
◆ StartMatch()
| void AMultiplayerGameMode::StartMatch |
( |
| ) |
|
|
overrideprotectedvirtual |
Start logic, Spawn in Players
Reimplemented from AOnlineGameMode.
Reimplemented in AMultiplayerHordeGameMode.
99{
100 Super::StartMatch();
101
103 {
104
105 const int32* PreviousScorePtr =
TeamScores.Find(TeamID);
106 int32 PreviousScore = 0;
107 if(PreviousScorePtr != nullptr)
108 {
109 PreviousScore = *PreviousScorePtr;
110 }
112 }
113
114
115
116
118 {
120 }
121
122
123}
bool bRoundBased
Definition MultiplayerGameMode.h:138
TArray< int32 > TeamIDs
Definition OnlineGameMode.h:101
◆ StartRound()
| void AMultiplayerGameMode::StartRound |
( |
| ) |
|
|
protectedvirtual |
Reimplemented in AMultiplayerHordeGameMode.
127{
135
141}
virtual void RoundCountdown()
Definition MultiplayerGameMode.cpp:143
virtual void SetRound(const int32 Num)
bool bMatchOver
Definition OnlineGameMode.h:130
void UpdateScore()
Definition OnlineGameMode.cpp:25
◆ UpdateGameState()
| void AMultiplayerGameMode::UpdateGameState |
( |
| ) |
|
|
overrideprotectedvirtual |
Reimplemented from AOnlineGameMode.
736{
737 Super::UpdateGameState();
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756}
◆ AIKilledScore
| int32 AMultiplayerGameMode::AIKilledScore = 1 |
|
protected |
◆ AIKilledXP
| float AMultiplayerGameMode::AIKilledXP = 25.0f |
|
protected |
◆ bEndOnTeamReachingGoal
| bool AMultiplayerGameMode::bEndOnTeamReachingGoal = true |
|
protected |
◆ bEndRoundCondition
| bool AMultiplayerGameMode::bEndRoundCondition = false |
|
private |
◆ bEndRoundOnTeamReachingGoal
| bool AMultiplayerGameMode::bEndRoundOnTeamReachingGoal = false |
|
protected |
◆ bPlayerLifeLimit
| bool AMultiplayerGameMode::bPlayerLifeLimit = false |
|
protected |
◆ bRoundBased
| bool AMultiplayerGameMode::bRoundBased = false |
|
protected |
◆ bRoundLimit
| bool AMultiplayerGameMode::bRoundLimit = false |
|
protected |
◆ bRoundsTimed
| bool AMultiplayerGameMode::bRoundsTimed = false |
|
protected |
◆ bSelfKillPenalty
| bool AMultiplayerGameMode::bSelfKillPenalty = true |
|
protected |
◆ bShowAIDeathInFeed
| bool AMultiplayerGameMode::bShowAIDeathInFeed = true |
|
protected |
◆ bShowDeathsInFeed
| bool AMultiplayerGameMode::bShowDeathsInFeed = true |
|
protected |
◆ bShowPlayerDeathsInFeed
| bool AMultiplayerGameMode::bShowPlayerDeathsInFeed = true |
|
protected |
◆ bTeamKillPenalty
| bool AMultiplayerGameMode::bTeamKillPenalty = true |
|
protected |
◆ GoalScore
| int32 AMultiplayerGameMode::GoalScore = 1 |
|
protected |
◆ MaxRounds
| int32 AMultiplayerGameMode::MaxRounds = 10 |
|
protected |
◆ MultiplayerGameState
◆ NextRoundTimerHandle
| FTimerHandle AMultiplayerGameMode::NextRoundTimerHandle |
|
private |
◆ ObjectiveScore
| int32 AMultiplayerGameMode::ObjectiveScore = 5 |
|
protected |
◆ PlayerKilledScore
| int32 AMultiplayerGameMode::PlayerKilledScore = 2 |
|
protected |
◆ PlayerKilledXP
| float AMultiplayerGameMode::PlayerKilledXP = 100.0f |
|
protected |
◆ PlayerLifePool
| int32 AMultiplayerGameMode::PlayerLifePool = 10 |
|
protected |
◆ Round
| int32 AMultiplayerGameMode::Round = 0 |
|
protected |
◆ RoundGoalScore
| int32 AMultiplayerGameMode::RoundGoalScore = 1 |
|
protected |
◆ RoundMatchState
◆ RoundTime
| int32 AMultiplayerGameMode::RoundTime = 20 |
|
protected |
◆ RoundTimeMax
| int32 AMultiplayerGameMode::RoundTimeMax = 10 |
|
protected |
◆ RoundTimerHandle
| FTimerHandle AMultiplayerGameMode::RoundTimerHandle |
|
private |
◆ SelfKilledXP
| float AMultiplayerGameMode::SelfKilledXP = -25.0f |
|
protected |
◆ SelfKillPenaltyTime
| int32 AMultiplayerGameMode::SelfKillPenaltyTime = 3 |
|
protected |
◆ TeamKilledXP
| float AMultiplayerGameMode::TeamKilledXP = -100.0f |
|
protected |
◆ TeamKillPenaltyTime
| int32 AMultiplayerGameMode::TeamKillPenaltyTime = 3 |
|
protected |
◆ TeamKillScore
| int32 AMultiplayerGameMode::TeamKillScore =-1 |
|
protected |
◆ TeamStarts
| TMap<int32, TArray<APlayerStart*> > AMultiplayerGameMode::TeamStarts |
◆ TimeTillNextRound
| float AMultiplayerGameMode::TimeTillNextRound = 4.0f |
|
protected |
The documentation for this class was generated from the following files:
- T:/Unreal/Unreal Projects/SpaceAdventure52/SpaceAdventure/Plugins/CustomALS/Source/CustomALS/Public/GameMode/MultiplayerGameMode.h
- T:/Unreal/Unreal Projects/SpaceAdventure52/SpaceAdventure/Plugins/CustomALS/Source/CustomALS/Private/GameMode/MultiplayerGameMode.cpp