Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.8.0 Alpha 3 #143

Open
wants to merge 5 commits into
base: 1-8-0-rewrite
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,229 changes: 1,117 additions & 112 deletions addons/sourcemod/scripting/include/sf2.inc

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions addons/sourcemod/scripting/include/sf2/defines.inc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#define FIREWORKSRED_PARTICLENAME "utaunt_firework_teamcolor_red"
#define TELEPORTEDINBLU_PARTICLENAME "teleported_red"
#define SOUND_THUNDER ")ambient/explosions/explode_9.wav"
#define DEBUG_PAGEREVEALSOUND "#ui/cyoa_node_activate.wav"

#define SPECIAL1UPSOUND "mvm/mvm_revive.wav"

Expand Down
112 changes: 80 additions & 32 deletions addons/sourcemod/scripting/include/sf2/profiles/profiles.inc
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ stock void TryPrecacheBossProfileSoundPath(const char[] soundPath, bool checkFil
* @param xbox Determines if the .xbox file extension should be checked.
* @param checkFile Determines if missing files should be checked.
*/
stock int PrecacheModel2(const char[] path, bool phy = true, bool xbox = false, bool checkFile)
stock int PrecacheModel2(const char[] path, bool phy = true, bool xbox = false, bool checkFile = false)
{
if (path[0] == '\0')
{
Expand All @@ -117,6 +117,7 @@ stock int PrecacheModel2(const char[] path, bool phy = true, bool xbox = false,
{
strcopy(fixedPath, sizeof(fixedPath), path);
}
ReplaceString(fixedPath, sizeof(fixedPath), "\\", "/", false);

ReplaceString(fixedPath, sizeof(fixedPath), ".mdl", "", false);

Expand Down Expand Up @@ -327,7 +328,7 @@ stock int PrecacheParticleSystem(const char[] particleSystem)
return index;
}

int FindStringIndex2(int tableidx, const char[] str)
stock int FindStringIndex2(int tableidx, const char[] str)
{
char buf[1024];

Expand Down Expand Up @@ -634,7 +635,7 @@ static const char g_DifficultyDefaultStringValues[Difficulty_Max][] =
* @param maxStringLen Maximum length of strings in buffer array
* @param defaultValueStrings Array of default values if no key with the base key name is found
*/
void GetProfileDifficultyStringValues(KeyValues kv, const char[] baseKeyName, char[][] bufferArray, int maxStringLen, const char[][] defaultValueStrings = g_DifficultyDefaultStringValues)
stock void GetProfileDifficultyStringValues(KeyValues kv, const char[] baseKeyName, char[][] bufferArray, int maxStringLen, const char[][] defaultValueStrings = g_DifficultyDefaultStringValues)
{
for (int i = 0; i < Difficulty_Max; i++)
{
Expand Down Expand Up @@ -704,7 +705,7 @@ stock void SetProfileDifficultyStringArrayValues(KeyValues kv, const char[] base
}
}

bool GetProfileColorNoBacks(KeyValues kv,
stock bool GetProfileColorNoBacks(KeyValues kv,
const char[] keyValue,
int &r,
int &g,
Expand Down Expand Up @@ -749,7 +750,7 @@ static const int g_DifficultyDefaultColorValues[Difficulty_Max][4] =
* @param buffer Array to store evaluated values
* @param defaultValueStrings Array of default values if no key with the base key name is found
*/
void GetProfileDifficultyColorValues(KeyValues kv, const char[] baseKeyName, int buffer[Difficulty_Max][4], const int defaultColorValues[Difficulty_Max][4] = g_DifficultyDefaultColorValues)
stock void GetProfileDifficultyColorValues(KeyValues kv, const char[] baseKeyName, int buffer[Difficulty_Max][4], const int defaultColorValues[Difficulty_Max][4] = g_DifficultyDefaultColorValues)
{
for (int i = 0; i < Difficulty_Max; i++)
{
Expand Down Expand Up @@ -791,11 +792,81 @@ void GetProfileDifficultyColorValues(KeyValues kv, const char[] baseKeyName, int
}
}

enum EffectEvent
{
EffectEvent_Invalid = -1,
EffectEvent_Constant = 0,
EffectEvent_HitPlayer,
EffectEvent_PlayerSeesBoss
};

enum EffectType
{
EffectType_Invalid = -1,
EffectType_Steam = 0,
EffectType_DynamicLight,
EffectType_Particle,
EffectType_Trail,
EffectType_PropDynamic,
EffectType_PointSpotlight,
EffectType_Sprite,
EffectType_TempEntBeamRing,
EffectType_TempEntParticle,
EffectType_Sound
};

enum
{
SF2BossAttackType_Invalid = -1,
SF2BossAttackType_Melee = 0,
SF2BossAttackType_Ranged = 1,
SF2BossAttackType_Projectile = 2,
SF2BossAttackType_ExplosiveDance = 3,
SF2BossAttackType_LaserBeam = 4,
SF2BossAttackType_Custom = 5,
SF2BossAttackType_Tongue = 6
};

enum
{
SF2BossProjectileType_Invalid = -1,
SF2BossProjectileType_Fireball = 0,
SF2BossProjectileType_Iceball = 1,
SF2BossProjectileType_Rocket = 2,
SF2BossProjectileType_Grenade = 3,
SF2BossProjectileType_SentryRocket = 4,
SF2BossProjectileType_Arrow = 5,
SF2BossProjectileType_Mangler = 6,
SF2BossProjectileType_Baseball = 7,
SF2BossProjectileType_Custom
};

enum
{
SF2BossTrapType_Invalid = -1,
SF2BossTrapType_BearTrap = 0,
SF2BossTrapType_Custom
};

enum
{
SF2DamageType_Invalid = -1,
SF2DamageType_Jarate = 0,
SF2DamageType_Milk,
SF2DamageType_Gas,
SF2DamageType_Mark,
SF2DamageType_Ignite,
SF2DamageType_Stun,
SF2DamageType_Bleed,
SF2DamageType_Smite,
SF2DamageType_Random
}

// ======================================
// ENUM STRUCTS
// ======================================

enum struct SF2BossProfileSoundInfo
/*enum struct SF2BossProfileSoundInfo
{
char SectionName[64];
int Channel;
Expand Down Expand Up @@ -1143,32 +1214,9 @@ enum struct SF2ParticleData
}
}
}
}

enum EffectEvent
{
EffectEvent_Invalid = -1,
EffectEvent_Constant = 0,
EffectEvent_HitPlayer,
EffectEvent_PlayerSeesBoss
};

enum EffectType
{
EffectType_Invalid = -1,
EffectType_Steam = 0,
EffectType_DynamicLight,
EffectType_Particle,
EffectType_Trail,
EffectType_PropDynamic,
EffectType_PointSpotlight,
EffectType_Sprite,
EffectType_TempEntBeamRing,
EffectType_TempEntParticle,
EffectType_Sound
};
}*/

enum struct SF2BossProfileBaseEffectInfo
/*enum struct SF2BossProfileBaseEffectInfo
{
char SectionName[64];
EffectEvent Event;
Expand Down Expand Up @@ -3144,4 +3192,4 @@ enum struct SF2BossProfileData
}

#include <sf2/profiles/profiles_chaser>
#include <sf2/profiles/profiles_statue>
#include <sf2/profiles/profiles_statue>*/
Original file line number Diff line number Diff line change
@@ -1,52 +1,5 @@
#include <morecolors>

enum
{
SF2BossAttackType_Invalid = -1,
SF2BossAttackType_Melee = 0,
SF2BossAttackType_Ranged = 1,
SF2BossAttackType_Projectile = 2,
SF2BossAttackType_ExplosiveDance = 3,
SF2BossAttackType_LaserBeam = 4,
SF2BossAttackType_Custom = 5,
SF2BossAttackType_Tongue = 6
};

enum
{
SF2BossProjectileType_Invalid = -1,
SF2BossProjectileType_Fireball = 0,
SF2BossProjectileType_Iceball = 1,
SF2BossProjectileType_Rocket = 2,
SF2BossProjectileType_Grenade = 3,
SF2BossProjectileType_SentryRocket = 4,
SF2BossProjectileType_Arrow = 5,
SF2BossProjectileType_Mangler = 6,
SF2BossProjectileType_Baseball = 7,
SF2BossProjectileType_Custom
};

enum
{
SF2BossTrapType_Invalid = -1,
SF2BossTrapType_BearTrap = 0,
SF2BossTrapType_Custom
};

enum
{
SF2DamageType_Invalid = -1,
SF2DamageType_Jarate = 0,
SF2DamageType_Milk,
SF2DamageType_Gas,
SF2DamageType_Mark,
SF2DamageType_Ignite,
SF2DamageType_Stun,
SF2DamageType_Bleed,
SF2DamageType_Smite,
SF2DamageType_Random
}

enum struct SF2BossProfileAttackGestureData // This one covers the gestures
{
ArrayList Names;
Expand Down Expand Up @@ -374,7 +327,7 @@ enum struct SF2ChaserBossProfileDamageEffectData // Can be any data
this.Sounds.Destroy();
}

void Apply(CBaseCombatCharacter player, int difficulty, SF2_ChaserBossEntity chaser = SF2_ChaserBossEntity(-1))
void Apply(CBaseCombatCharacter player, int difficulty, SF2_ChaserBossEntity chaser = view_as<SF2_ChaserBossEntity>(-1))
{
if (!this.Enabled[difficulty])
{
Expand Down Expand Up @@ -600,7 +553,7 @@ enum struct SF2ChaserBossProfileShockwaveData
}
}

void ApplyDamageEffects(CBaseCombatCharacter player, int difficulty, SF2_ChaserBossEntity chaser = SF2_ChaserBossEntity(-1))
void ApplyDamageEffects(CBaseCombatCharacter player, int difficulty, SF2_ChaserBossEntity chaser = view_as<SF2_ChaserBossEntity>(-1))
{
if (this.DamageEffects == null)
{
Expand Down Expand Up @@ -1061,7 +1014,7 @@ enum struct SF2ChaserBossProfileAttackData
return strcmp(subType, this.SubType) == 0;
}

void ApplyDamageEffects(CBaseCombatCharacter player, int difficulty, SF2_ChaserBossEntity chaser = SF2_ChaserBossEntity(-1))
void ApplyDamageEffects(CBaseCombatCharacter player, int difficulty, SF2_ChaserBossEntity chaser = view_as<SF2_ChaserBossEntity>(-1))
{
if (this.DamageEffects == null)
{
Expand Down
4 changes: 2 additions & 2 deletions addons/sourcemod/scripting/include/sf2/stocks.inc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma semicolon 1

bool DispatchParticleEffect(int entity, const char[] particle, float startPos[3], float angles[3], float endPos[3],
stock bool DispatchParticleEffect(int entity, const char[] particle, float startPos[3], float angles[3], float endPos[3],
int attachmentPointIndex = 0, ParticleAttachment attachType = PATTACH_CUSTOMORIGIN, bool resetAllParticlesOnEntity = false)
{
char particleReal[PLATFORM_MAX_PATH];
Expand Down Expand Up @@ -55,7 +55,7 @@ bool DispatchParticleEffect(int entity, const char[] particle, float startPos[3]
return true;
}

bool DispatchParticleEffectBeam(int entity, const char[] particle, float startPos[3], float angles[3], float endPos[3],
stock bool DispatchParticleEffectBeam(int entity, const char[] particle, float startPos[3], float angles[3], float endPos[3],
int attachmentPointIndex = 0, ParticleAttachment attachType = PATTACH_CUSTOMORIGIN, bool resetAllParticlesOnEntity = false)
{
char particleReal[PLATFORM_MAX_PATH];
Expand Down
Loading