Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8cef422ea7 | |||
| 54a03ddc0f | |||
| d492b54687 | |||
| c1395355c6 | |||
| f62f8d53db | |||
| 51c7e92fce | |||
| 3994c0f7ad | |||
| 1345889e62 | |||
| fe6f294986 | |||
| 33ed59fc3a | |||
| 7855cf03d2 | |||
| 03dab9ca9a | |||
| 1a120ef345 | |||
| 0d823421d8 |
+1
-1
Submodule deps updated: ed45883a44...49ef585366
@@ -36,6 +36,7 @@
|
||||
#include "Network/ESearchForServers.h"
|
||||
#include "Network/EInterpolate.h"
|
||||
#include "Network/SnapshotFilter.h"
|
||||
#include "Core/EWin.h"
|
||||
|
||||
class Client : public Network
|
||||
{
|
||||
@@ -107,6 +108,7 @@ private:
|
||||
void parseAmmoPickup(Packet& packet);
|
||||
void parseRemoveWorld(Packet& packet);
|
||||
void parseKDEvent(Packet& packet);
|
||||
void parseWin(Packet& packet);
|
||||
void InterpolateFields(Packet& packet, const ComponentInfo & componentInfo, const EntityID & entityID, const std::string & componentType);
|
||||
void parseSnapshot(Packet& packet);
|
||||
void identifyPacketLoss();
|
||||
|
||||
@@ -25,6 +25,7 @@ enum class MessageType
|
||||
AmmoPickup,
|
||||
RemoveWorld,
|
||||
KD,
|
||||
Win,
|
||||
Invalid
|
||||
};
|
||||
|
||||
|
||||
@@ -81,6 +81,7 @@ private:
|
||||
void setSoundProperties(Source* source, ComponentWrapper* soundComponent);
|
||||
float getDurationSeconds(Source* source);
|
||||
float getTimeOffsetSeconds(Source* source);
|
||||
void setTimeOffsetSeconds(Source* source, float timeOffset);
|
||||
|
||||
// Specific logic
|
||||
void playSound(Source* source);
|
||||
|
||||
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 49 KiB |
Executable
+76
@@ -0,0 +1,76 @@
|
||||
; Script generated by the Inno Setup Script Wizard.
|
||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||
|
||||
#define MyAppName "Axyz"
|
||||
#define MyAppVersion "1.0"
|
||||
#define MyAppURL "https://github.com/teamfisk/TacticalZ"
|
||||
#define MyAppExeName "TacticalZ.exe"
|
||||
|
||||
[Setup]
|
||||
; NOTE: The value of AppId uniquely identifies this application.
|
||||
; Do not use the same AppId value in installers for other applications.
|
||||
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
|
||||
AppId={{38D77EB2-6B56-4B4F-BAAE-43F9E6E1A191}
|
||||
AppName={#MyAppName}
|
||||
AppVersion={#MyAppVersion}
|
||||
;AppVerName={#MyAppName} {#MyAppVersion}
|
||||
AppPublisherURL={#MyAppURL}
|
||||
AppSupportURL={#MyAppURL}
|
||||
AppUpdatesURL={#MyAppURL}
|
||||
DefaultDirName={pf}\{#MyAppName}
|
||||
DisableProgramGroupPage=yes
|
||||
OutputBaseFilename=Axyz Setup
|
||||
SetupIconFile=..\Axyz.ico
|
||||
Compression=lzma2
|
||||
SolidCompression=yes
|
||||
; "ArchitecturesAllowed=x64" specifies that Setup cannot run on
|
||||
; anything but x64.
|
||||
ArchitecturesAllowed=x64
|
||||
; "ArchitecturesInstallIn64BitMode=x64" requests that the install be
|
||||
; done in "64-bit mode" on x64, meaning it should use the native
|
||||
; 64-bit Program Files directory and the 64-bit view of the registry.
|
||||
ArchitecturesInstallIn64BitMode=x64
|
||||
OutputDir=.
|
||||
DisableWelcomePage=false
|
||||
;WizardSmallImageFile=
|
||||
WizardImageFile=Setup Banner.bmp
|
||||
|
||||
[Languages]
|
||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||
|
||||
[Tasks]
|
||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
||||
|
||||
[Files]
|
||||
Source: "..\..\bin\Audio\*"; DestDir: "{app}\Audio\"; Flags: ignoreversion createallsubdirs recursesubdirs
|
||||
Source: "..\..\bin\Fonts\*"; DestDir: "{app}\Fonts\"; Flags: ignoreversion createallsubdirs recursesubdirs
|
||||
Source: "..\..\bin\Licenses\*"; DestDir: "{app}\Licenses\"; Flags: ignoreversion createallsubdirs recursesubdirs
|
||||
Source: "..\..\bin\Models\*"; DestDir: "{app}\Models\"; Flags: ignoreversion createallsubdirs recursesubdirs
|
||||
Source: "..\..\bin\Schema\*"; DestDir: "{app}\Schema\"; Flags: ignoreversion createallsubdirs recursesubdirs
|
||||
Source: "..\..\bin\Shaders\*"; DestDir: "{app}\Shaders\"; Flags: ignoreversion createallsubdirs recursesubdirs
|
||||
Source: "..\..\bin\Textures\*"; DestDir: "{app}\Textures\"; Flags: ignoreversion createallsubdirs recursesubdirs
|
||||
Source: "..\..\bin\assimp.dll"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "..\..\bin\DefaultConfig.ini"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "..\..\bin\DefaultInput.ini"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "..\..\bin\glew32.dll"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "..\..\bin\glfw3.dll"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "..\..\bin\imgui.ini"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "..\..\bin\Input.ini"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "..\..\bin\libpng16.dll"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "..\..\bin\TacticalZ.exe"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "..\..\bin\xerces-c_3_1.dll"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "..\..\bin\zlib.dll"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "..\..\deps\redist\VC_redist.x64.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall
|
||||
|
||||
[Icons]
|
||||
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
|
||||
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
|
||||
|
||||
[INI]
|
||||
Filename: "{app}\Config.ini"; Section: "Networking"; Key: "Name"; String: "{%USERNAME}"; Flags: createkeyifdoesntexist
|
||||
|
||||
[Run]
|
||||
Filename: "{tmp}\VC_redist.x64.exe"; Parameters: "/norestart /passive"; StatusMsg: "Installing Microsoft Visual C++ 2015 x64 Redistributable....";
|
||||
|
||||
[ThirdParty]
|
||||
UseRelativePaths=True
|
||||
Executable
BIN
Binary file not shown.
|
After Width: | Height: | Size: 151 KiB |
Executable
BIN
Binary file not shown.
@@ -176,6 +176,9 @@ void Client::parseMessageType(Packet& packet)
|
||||
case MessageType::KD:
|
||||
parseKDEvent(packet);
|
||||
break;
|
||||
case MessageType::Win:
|
||||
parseWin(packet);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -376,6 +379,13 @@ void Client::parseKDEvent(Packet & packet)
|
||||
m_EventBroker->Publish(e);
|
||||
}
|
||||
|
||||
void Client::parseWin(Packet& packet)
|
||||
{
|
||||
Events::Win e;
|
||||
e.TeamThatWon = packet.ReadPrimitive<int>();
|
||||
m_EventBroker->Publish(e);
|
||||
}
|
||||
|
||||
void Client::updateFields(Packet& packet, const ComponentInfo& componentInfo, const EntityID& entityID)
|
||||
{
|
||||
for (auto field : componentInfo.FieldsInOrder) {
|
||||
|
||||
@@ -609,6 +609,9 @@ bool Server::OnWin(const Events::Win & e)
|
||||
{
|
||||
// Postpone the gameover reset
|
||||
m_GameIsOver = true;
|
||||
Packet winPacket = Packet(MessageType::Win);
|
||||
winPacket.WritePrimitive(e.TeamThatWon);
|
||||
reliableBroadcast(winPacket);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -417,6 +417,14 @@ bool SoundManager::OnSetCamera(const Events::SetCamera& e)
|
||||
alSourcei(m_CurrentBGMCombo->ALsource, AL_LOOPING, 1);
|
||||
setGain(m_CurrentBGMCombo, 0);
|
||||
playSound(m_CurrentBGMCombo);
|
||||
} else if (m_World->HasComponent(e.CameraEntity.ID, "EndScreen")) {
|
||||
float timeOffset = getTimeOffsetSeconds(m_CurrentBGM);
|
||||
stopSound(m_CurrentBGM);
|
||||
m_CurrentBGM = createSource("Audio/BGM/Layer3.wav");
|
||||
m_CurrentBGM->Type = SoundType::BGM;
|
||||
alSourcei(m_CurrentBGM->ALsource, AL_LOOPING, 1);
|
||||
playSound(m_CurrentBGM);
|
||||
setTimeOffsetSeconds(m_CurrentBGM, timeOffset);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -477,6 +485,11 @@ float SoundManager::getTimeOffsetSeconds(Source* source)
|
||||
return time;
|
||||
}
|
||||
|
||||
void SoundManager::setTimeOffsetSeconds(Source * source, float timeOffset)
|
||||
{
|
||||
alSourcef(source->ALsource, AL_SEC_OFFSET, timeOffset);
|
||||
}
|
||||
|
||||
void SoundManager::initOpenAL()
|
||||
{
|
||||
// Initialize OpenAL
|
||||
|
||||
@@ -55,6 +55,7 @@ target_link_libraries(Game
|
||||
|
||||
add_executable(TacticalZ
|
||||
main.cpp
|
||||
${CMAKE_SOURCE_DIR}/resources/TacticalZ.rc
|
||||
)
|
||||
target_link_libraries(TacticalZ
|
||||
Game
|
||||
|
||||
@@ -87,6 +87,9 @@ bool SoundSystem::OnPlayerDamage(const Events::PlayerDamage & e)
|
||||
if (!e.Victim.Valid() || !e.Inflictor.Valid()) {
|
||||
return false;
|
||||
}
|
||||
if (e.Victim.ID != LocalPlayer.ID) {
|
||||
return false;
|
||||
}
|
||||
auto victimTeam = m_World->GetComponent(e.Victim.ID, "Team");
|
||||
auto inflictorTeam = m_World->GetComponent(e.Inflictor.ID, "Team");
|
||||
if ((int)victimTeam["Team"] == (int)inflictorTeam["Team"]) {
|
||||
|
||||
Reference in New Issue
Block a user