Skip to content

Instantly share code, notes, and snippets.

#pragma once
#include "GameFramework/Actor.h"
#include "Weapon.generated.h"
class ABaseCharacter;
class AProjectile;
class UAnimMontage;
class USceneComponent;
class UTexture2D;
UCLASS()
class AServerGameMode : public ABaseGameMode
{
GENERATED_BODY()
public:
AServerGameMode();
UFUNCTION(BlueprintCallable)
// Sets default values
ASpawnVolume::ASpawnVolume()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = false;
if (Role == ROLE_Authority)
{
WhereToSpawn = CreateDefaultSubobject<UBoxComponent>(TEXT("SpawnVolume"));
RootComponent = WhereToSpawn;
Log file open, 01/23/19 17:20:10
LogWindows: Failed to load 'aqProf.dll' (GetLastError=126)
LogWindows: File 'aqProf.dll' does not exist
LogWindows: Failed to load 'VtuneApi.dll' (GetLastError=126)
LogWindows: File 'VtuneApi.dll' does not exist
LogWindows: Failed to load 'VtuneApi32e.dll' (GetLastError=126)
LogWindows: File 'VtuneApi32e.dll' does not exist
LogConsoleResponse: Display: Failed to find resolution value strings in scalability ini. Falling back to default.
LogInit: Display: Running engine for game: OpenGhosts
LogPakFile: Registered encryption key '00000000000000000000000000000000': 0 pak files mounted, 0 remain pending
<?xml version="1.0" encoding="UTF-8"?>
<FGenericCrashContext>
<RuntimeProperties>
<CrashVersion>3</CrashVersion>
<CrashGUID>UE4CC-Windows-B08B3EF049B35EEE69B1EDAB689C6843_0000</CrashGUID>
<ProcessId>20084</ProcessId>
<IsInternalBuild>false</IsInternalBuild>
<IsPerforceBuild>false</IsPerforceBuild>
<IsSourceDistribution>false</IsSourceDistribution>
<IsEnsure>false</IsEnsure>
void ABaseGameMode::EndCurrentDetailedMatchState()
{
switch (myDetailedMatchState)
{
case EMatchState::WaitingPostMatch:
RestartGame();
return;
case EMatchState::WaitingToStart:
if (ReadyToStartMatch())
StartMatch();
FTimerDelegate TimerDel;
FTimerHandle TimerHandle;
void ABaseCharacter::StartFire()
{
if(myWeapon->auto_fire)
{
//start timer until fire released
GetWorldTimerManager().SetTimer(TimerHandle,this, &ABaseCharacter::FireWeapon, myWeapon->auto_fire_rate, true,0);
}
void ABaseCharacter::FireWeapon()
{
ABasePlayerController* controller = Cast<ABasePlayerController>(Controller);
if (!controller || !controller->IsGameInputAllowed())
return;
FHitResult OutHit;
FVector start = myCamera->GetComponentLocation();
FVector end = start + myCamera->GetForwardVector() * 100000.0f;
FCollisionQueryParams CollisionParams;
CollisionParams.AddIgnoredActor(this);
void ABaseCharacter::StartFire()
{
ABasePlayerController* controller = Cast<ABasePlayerController>(Controller);
if (!controller || !controller->IsGameInputAllowed())
return;
// TODO this will need tweaking for high latency situations (client decision only for now)
if (myWeapon)
{
FHitResult OutHit;
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
import java.awt.AlphaComposite;
import java.awt.BasicStroke;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Color;