Skip to content

Commit

Permalink
Update cssdk minor to 26 (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
fl0werD authored Dec 30, 2023
1 parent ac19f84 commit 5c63df6
Show file tree
Hide file tree
Showing 4 changed files with 453 additions and 496 deletions.
159 changes: 159 additions & 0 deletions libs/cssdk/include/cssdk/game_shared/game_event.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
/*
* Half Life 1 SDK Copyright(c) Valve Corp.
*
* THIS DOCUMENT DESCRIBES A CONTRACT BETWEEN YOU AND VALVE CORPORATION ("Valve").
* PLEASE READ IT BEFORE DOWNLOADING OR USING THE HALF LIFE 1 SDK ("SDK"). BY
* DOWNLOADING AND/OR USING THE HALF LIFE 1 SDK YOU ACCEPT THIS LICENSE. IF YOU DO
* NOT AGREE TO THE TERMS OF THIS LICENSE PLEASE DON'T DOWNLOAD OR USE THE SDK.
*
* You may, free of charge, download and use the SDK to develop a modified Valve
* game running on the Half-Life 1 engine. You may distribute your modified Valve
* game in source and object code form, but only for free. Terms of use for Valve
* games are found in the Steam Subscriber Agreement located here:
* http://store.steampowered.com/subscriber_agreement/
*
* You may copy, modify, and distribute the SDK and any modifications you make to
* the SDK in source and object code form, but only for free. Any distribution of
* this SDK must include this LICENSE file.
*
* Any distribution of the SDK or a substantial portion of the SDK must include
* the above copyright notice and the following:
*
* DISCLAIMER OF WARRANTIES. THE HALF LIFE 1 SDK AND ANY OTHER MATERIAL
* DOWNLOADED BY LICENSEE IS PROVIDED "AS IS". VALVE AND ITS SUPPLIERS
* DISCLAIM ALL WARRANTIES WITH RESPECT TO THE SDK, EITHER EXPRESS OR IMPLIED,
* INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY,
* NON-INFRINGEMENT, TITLE AND FITNESS FOR A PARTICULAR PURPOSE.
*
* LIMITATION OF LIABILITY. IN NO EVENT SHALL VALVE OR ITS SUPPLIERS BE LIABLE
* FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER
* (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS,
* BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY
* LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THE ENGINE AND/OR THE
* SDK, EVEN IF VALVE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* If you would like to use the SDK for a commercial purpose, please contact Valve
* at [email protected].
*/

#pragma once

#ifdef __INTEL_COMPILER
#pragma warning(push)
#pragma warning(disable : 2021)
#endif

namespace cssdk
{
enum class GameEventType {
invalid = 0,
WeaponFired,
WeaponFiredOnEmpty,
WeaponReloaded,

HeGrenadeExploded,
FlashbangGrenadeExploded,
SmokeGrenadeExploded,
GrenadeBounced,

BeingShotAt,
PlayerBlindedByFlashbang,
PlayerFootstep,
PlayerJumped,
PlayerDied,
PlayerLandedFromHeight,
PlayerTookDamage,
HostageDamaged,
HostageKilled,

Door,
BreakGlass,
BreakWood,
BreakMetal,
BreakFlesh,
BreakConcrete,

BombPlanted,
BombDropped,
BombPickedUp,
BombBeep,
BombDefusing,
BombDefuseAborted,
BombDefused,
BombExploded,

HostageUsed,
HostageRescued,
AllHostagesRescued,

VipEscaped,
VipAssassinated,
TerroristsWin,
CtsWin,
RoundDraw,
RoundWin,
RoundLoss,
RoundStart,
PlayerSpawned,
ClientCorpseSpawned,
BuyTimeStart,
PlayerLeftBuyZone,
DeathCameraStart,
KillAll,
RoundTime,
Die,
Kill,
Headshot,
KillFlashbanged,
TutorBuyMenuOpened,
TutorAutoBuy,
PlayerBoughtSomething,
TutorNotBuyingAnything,
TutorNeedToBuyPrimaryWeapon,
TutorNeedToBuyPrimaryAmmo,
TutorNeedToBuySecondaryAmmo,
TutorNeedToBuyArmor,
TutorNeedToBuyDefuseKit,
TutorNeedToBuyGrenade,
CareerTaskDone,

StartRadio1,
RadioCoverMe,
RadioYouTakeThePoint,
RadioHoldThisPosition,
RadioRegroupTeam,
RadioFollowMe,
RadioTakingFire,
StartRadio2,
RadioGoGoGo,
RadioTeamFallBack,
RadioStickTogetherTeam,
RadioGetInPositionAndWait,
RadioStormTheFront,
RadioReportInTeam,
StartRadio3,
RadioAffirmative,
RadioEnemySpotted,
RadioNeedBackup,
RadioSectorClear,
RadioInPosition,
RadioReportingIn,
RadioGetOutOfThere,
RadioNegative,
RadioEnemyDown,
EndRadio,

NewMatch,
PlayerChangedTeam,
BulletImpact,
GameCommence,
WeaponZoomed,
HostageCalledForHelp,

NUM_GAME_EVENTS,
};
}

#ifdef __INTEL_COMPILER
#pragma warning(pop)
#endif
86 changes: 50 additions & 36 deletions libs/cssdk/include/cssdk/public/regamedll/cs_entity.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,43 +44,57 @@

namespace cssdk
{
/**
* @brief N/D
*/
constexpr auto CS_ENTITY_API_INTERFACE_VERSION = "CSENTITY_API_INTERFACE_VERSION002";
constexpr auto CS_ENTITY_API_INTERFACE_VERSION = "CSENTITY_API_INTERFACE_VERSION003";

class CsEntity // NOLINT(cppcoreguidelines-special-member-functions)
{
public:
/**
* @brief N/D
*/
public:
virtual ~CsEntity() = default;

/**
* @brief N/D
*/
virtual void FireBullets(int shots, Vector& src, Vector& dir_shooting, Vector& spread, float distance,
BulletType bullet_type, int tracer_freq, int damage, EntityVars* attacker) = 0;
virtual void FireBullets(
int shots,
Vector& src,
Vector& direction,
Vector& spread,
float distance,
BulletType bulletType,
int tracerFreq,
int damage,
EntityVars* attacker
) = 0;

/**
* @brief N/D
*/
virtual void FireBuckshots(unsigned long shots, Vector& src, Vector& dir_shooting, Vector& spread,
float distance, int tracer_freq, int damage, EntityVars* attacker) = 0;
virtual void FireBuckshots(
unsigned long shots,
Vector& src,
Vector& direction,
Vector& spread,
float distance,
int tracerFreq,
int damage,
EntityVars* attacker
) = 0;

virtual Vector FireBullets3(
Vector& src,
Vector& direction,
float spread,
float distance,
int penetration,
BulletType bulletType,
int damage,
float rangeModifier,
EntityVars* attacker,
bool pistol,
int sharedRand
) = 0;

/**
* @brief N/D
*/
virtual Vector FireBullets3(Vector& src, Vector& dir_shooting, float spread, float distance, int penetration,
BulletType bullet_type, int damage, float range_modifier, EntityVars* attacker,
bool pistol, int shared_rand) = 0;
/**
* @brief N/D
*/
EntityBase* containing_entity{};
unsigned char damagePenetrationLevel;
EntityVars *lastInflictor;

private:
char CCSEntity_Reserve[0x3FF7];

private:
virtual void FuncReserve1() = 0;
virtual void FuncReserve2() = 0;
virtual void FuncReserve3() = 0;
Expand Down Expand Up @@ -113,19 +127,19 @@ namespace cssdk
virtual void FuncReserve30() = 0;
};

class CsDelay : public CsEntity
{
class CsDelay : public CsEntity {
int CsDelay_Reserve[0x100];
};

class CsAnimating : public CsDelay
{
class CsAnimating : public CsDelay {
int CsAnimating_Reserve[0x100];
};

class CsToggle : public CsAnimating
{
class CsToggle : public CsAnimating {
int CsToggle_Reserve[0x100];
};

class CsMonster : public CsToggle
{
class CsMonster : public CsToggle {
int CsMonster_Reserve[0x100];
};
}
Loading

0 comments on commit 5c63df6

Please sign in to comment.