Git Product home page Git Product logo

jordon87 / source-sdk-2013 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from malortie/source-sdk-2013

0.0 0.0 0.0 772.32 MB

The 2013 edition of the Source SDK

Home Page: https://developer.valvesoftware.com/wiki/SDK2013_GettingStarted

License: Other

Shell 0.01% C++ 96.06% Perl 0.23% C 2.81% Objective-C 0.46% Assembly 0.01% Objective-C++ 0.01% Makefile 0.08% Protocol Buffer 0.02% GLSL 0.31% Batchfile 0.02% Perl 6 0.01%

source-sdk-2013's Introduction

               SOURCE 1 SDK LICENSE

Source SDK Copyright(c) Valve Corp.  

THIS DOCUMENT DESCRIBES A CONTRACT BETWEEN YOU AND VALVE 
CORPORATION ("Valve").  PLEASE READ IT BEFORE DOWNLOADING OR USING 
THE SOURCE ENGINE SDK ("SDK"). BY DOWNLOADING AND/OR USING THE 
SOURCE ENGINE 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 Source 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 and thirdpartylegalnotices.txt.  
 
  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 SOURCE 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].

source-sdk-2013's People

Contributors

joeludwig avatar jorgenpt avatar narendraumate avatar sortie avatar alanedwardes avatar bruced-valve avatar jstasiak avatar nephyrin avatar mikesartain avatar neico avatar psychonic avatar alfred-valve avatar plesiecki avatar

source-sdk-2013's Issues

Compile error: InitCustomSchedules already defined in `npc_armouredzombie.cpp`.

As of dc57188 the code encounters an error during build.

1>c:\users\marc-\documents\github\source-sdk-2013\src\game\server\1187\npc_armouredzombie.cpp(286): error C2084: function 'void CNPC_ArmouredZombie::InitCustomSchedules(void)' already has a body
1>          c:\users\marc-\documents\github\source-sdk-2013\src\game\server\1187\npc_armouredzombie.cpp(25) : see previous definition of 'InitCustomSchedules'

void CNPC_ArmouredZombie::InitCustomSchedules(void)
{
INIT_CUSTOM_AI(CNPC_ArmouredZombie);
ADD_CUSTOM_ACTIVITY(CNPC_ArmouredZombie, ACT_ZOMBINE_ATTACK_FAST);
}

Removing it allows the code to compile. Of note, ACT_ZOMBINE_ATTACK_FAST is already registered here:

AI_BEGIN_CUSTOM_NPC(npc_armouredzombie, CNPC_ArmouredZombie)
DECLARE_ACTIVITY(ACT_ZOMBINE_ATTACK_FAST)
AI_END_CUSTOM_NPC()

Player hands use the wrong textures in Rogue Train.

In the original Rogue Train, some weapons' viewmodel hands textures are different.

As of b527cec weapons still use the default hand texture.

Weapons that use a custom texture:

weapon_357
weapon_crowbar
weapon_healthpack
weapon_kar98
weapon_knife
weapon_m16
weapon_m4
weapon_pistol
weapon_rpg
weapon_smg1

Weapons that use the default hand texture:

weapon_colt
weapon_dualpistol
weapon_shotgun

Note: weapon_secret does not have hands so there's likely nothing for it.

Note: Looking at v_1187beretta.mdl, there are additional skins besides Rogue Train sleeves. It could be possible they were meant to be user customizable or to be used in coop ?

Viewmodel flashlight clips throught wall on specific weapons.

In the original mod, when using M4 or Shotgun, and against a wall, the flashlight origin clips through the wall.

As of b527cec this also occurs, showing that the behavior follows the same.

Goal: See if it's possible to improve. A traceline could possibly be used to see if the player is at a specific distance and consequently adjust the flashlight origin so that it does not go through the wall.

Test NPCs relationships.

From the decompiled VMFs, below are all the NPCs that appear in 1187 (including Roguetrain).

All NPCs in 1187 maps:

npc_armouredzombie
npc_barnacle
npc_burstzombie
npc_chris
npc_citizen
npc_citizen_old
npc_combinegunship
npc_crow
npc_fastzombie
npc_gman
npc_headcrab
npc_headcrab_black
npc_headcrab_fast
npc_helicopter
npc_houndeye
npc_john
npc_mike
npc_poisonzombie
npc_vortigaunt
npc_vortigaunt_enhanced
npc_zombie

To my recall, NPCs such as npc_chris that weren't attacking mercenaries (npc_citizen)

A test map has been made to verify the behavior. It currently supports the following entities:

npc_armouredzombie
npc_burstzombie
npc_chris
npc_citizen
npc_citizen_old
npc_crow
npc_fastzombie
npc_gman
npc_headcrab
npc_headcrab_black
npc_headcrab_fast
npc_houndeye
npc_john
npc_mike
npc_poisonzombie
npc_vortigaunt
npc_vortigaunt_enhanced
npc_zombie

The remaining entities will come later in a separate map or an updated map version after I have time.

npc_barnacle
npc_combinegunship
npc_helicopter

The map has 2 spawn spots: 1 - left, 2 - right . Fire at the panels with the pistol to change the spawn spot.

18 buttons are available (one for each NPC class). Press any button to spawn an NPC of a specific class at the spawn spot you designated. Other NPCs such as npc_headcrab_burst can be tested by killing npc_burstzombie.

A pistol ammo crate is behind the player spawn.

To test with different NPCs, reload the map.

Goal: Test the relationship between entities.

test_relationship.zip

Sky texture sky_day01_09 stretched vertically.

In the original mod, the sky texture 'sky_day01_09' renders correctly.

As of b527cec sky texture 'sky_day01_09' appear to render stretched vertically. It appears tiled twice.

From memory, such issues happened to HL2 games briefly after they were ported to Orange box engine but were fixed later on.

All maps were checked.

Regular campaign maps don't reset hand skin.

This happens in the original mod too.

In 1187_roguetrain_bonus.bsp, the map sends g_handskin 1 command to set the hand skin to use.

"OnNewGame" "com01,Command,g_handskin 1,0.05,-1"

There is no point_clientcommand in the regular campaign maps that sets it to 0, so the alternative hand skin texture remains effective when loading any map from the regular campaign after previously playing on Rogue Train map.

The easiest way to address this is to extract the entity lump of each map using vbspinfo -X0 *.bsp and patch them. lmpfix can be used for patching.

Create Gamepad UI version of chapter titles.

As of 1eded8e , the current chapter images are the default ones.

Create new images to use for the Gamepad UI.

Approaches (can be a combination of each):

A) Use the original ones (not upscaled)
B) Upscale the original ones
C) Take a high-res screenshot that resembles the original ones

M4 reload interruption.

In the original mod, the M4 reload can be interrupted if secondary attack is pressed. The weapons will switch firing mode but it does not cancel reload, so the clip refills.

As of b527cec this also happens.

Goal: Either prevent interrupting reload or cancel it when the player presses secondary attack.

Add custom closed captions.

The 2015 Source SDK 2013 patches have custom closed captions.

The one from Rogue Train includes those from the Source 2013 patch 1187 plus the new lines for Rogue Train.

https://www.moddb.com/mods/1187/downloads/1187-rogue-train-patch-source-sdk-2013

Game sound manifest files will likely have to be edited to reference the sounds associated to these captions.

Note: Only the closecaptions_english.txt should be added. The compiled version should only be shipped with the release.

Frag grenades are treated as weapons.

In the original game, collecting a frag grenade only increments the grenade ammo count, but they can't be used as a distinct weapon.

In the current build as of 747df5e , this gives the HL2 weapon frag and is selectable in weapon list.

Ladders do not work.

The original mod's ladder behavior works in the same way as HL1.

The code currently uses CHL2GameMovement, which overrides the following methods:

virtual void FullLadderMove();
virtual bool LadderMove( void );
virtual bool OnLadder( trace_t &trace );
virtual int GetCheckInterval( IntervalType_t type );
virtual void	SetGroundEntity( trace_t *pm );
virtual bool CanAccelerate( void );

Calling BaseClass on the first 4 methods (FullLadderMove, LadderMove, OnLadder, GetCheckInterval) allows it to handle ladder movement in the same way as HL1.

In addition, func_ladder entity appears to be missing. A possible implementation would be:

Note: This is a bit different from the way it's made in the 2015 patch.

class CFuncLadder : public CBaseEntity
{
	DECLARE_CLASS(CFuncLadder, CBaseEntity);
public:
	virtual void Spawn(void);
};

LINK_ENTITY_TO_CLASS(func_ladder, CFuncLadder);

void C1187FuncLadder::Spawn(void)
{
	BaseClass::Spawn();
	SetCollisionGroup(COLLISION_GROUP_PLAYER_MOVEMENT); // Needed to allow to work in CGameMovement::LadderMove()
}

Note: func_ladder doesn't seem to appear in the original server.dll so there's a possibility it's handled differently.

Please, can you review the reverse engineered code ?

Heavy mercenaries drop AR2 grenades.

In the original mod, heavy mercs (elites) don't drop grenades

As of b527cec heavy mercs drop AR2 grenades when they are killed.

A test map is provided featuring 2 normal mercs and 2 heavy mercs, each equipped with MP5/M4.

Expected behavior:

Normal and heavy mercs shouldn't drop any grenades.

test_merc_drop_grenade.zip

Add precompiled binaries, libs, tools that were deleted in cef9b76150b7c6e63490ad0e4f64d6d25df37370

Commit cef9b76 removed many files, including libraries, .exe files.

As of 2709c7b the code cannot compile.

2>LINK : fatal error LNK1181: cannot open input file '..\..\lib\public\bitmap.lib'
1>LINK : fatal error LNK1181: cannot open input file '..\..\lib\public\bitmap.lib'
3>LINK : fatal error LNK1181: cannot open input file '..\..\lib\public\choreoobjects.lib'

Can you please add all precompiled libraries, programs and tools from sp/src that originally come with the default Source SDK 2013 master branch ?

Enemies continue to attack John after he's on the ground calling for help.

In the original mod, enemies cease to attack John when he's falling to the ground calling for help. This happens on all skill levels. When the player heals John, enemies attack again.

As of c989403, enemies keep attacking John while he's calling for help (on the ground).

  1. Load test_john_heal2
  2. Use the buttons to remove each enemy (if you want to only test for a specific enemy)
  3. In console, type: ent_fire npc_john sethealth 100 to reduce John's health

You can use host_framerate 0.09 to make the game go faster.

Set host_framerate 0 to make the game run normally.

Expected:

  • Enemies cease to attack John while he's calling for help on the ground
  • Enemies attack John again after the player heals him

test_john_heal2.zip

Healing John makes him disappears.

In the original mod, healing John makes him go back to combat.

As of c989403 healing John makes him disappear.

  1. Load the map test_john_heal
  2. Wait until John starts calling for help (falling to ground)
  3. Touch John to heal him

You can use host_framerate 0.09 to make the game go faster.

Set host_framerate 0 to make the game run normally.

test_john_heal.zip

Viewmodel rotates when looking up or down.

In the original mod, when using ironsights, viewmodels always remain centered, regardless of player view pitch.

As of c989403 all weapons are centered when view pitch is 0 but viewmodel rotates slightly toward right or left depending on if you look up or down.

Searching in CBaseViewModel::CalcViewModelView would a good starting point.

Incorrect NPC interaction with barnacles.

I created a test map with a barnacle above each of the following entities:

npc_chris
npc_citizen
npc_citizen_old
npc_john
npc_mike

In the original mod, the following entities are killed:

npc_chris
npc_citizen
npc_citizen_old
npc_mike

In the current build, as of aada019 the following entities are killed:

npc_citizen
npc_citizen_old
npc_john

All of the aforementioned entities should be killed except John.

test_barnacle.zip

Easter eggs values.

Note: Rogue Train has no easter eggs.

Depending on how many secret easter eggs the player collected, these are the values found in config.cfg :

With 0 eggs:

dec_1187_encryptedeggs "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"

With 1 egg:

dec_1187_encryptedeggs "00100010111001001010111110101010110111111000111100010110001001010000000011111100111000110001100011000"

With 2 eggs:

dec_1187_encryptedeggs "00100000101000111111001000000110110001001001001000000010011001010100010110101001001011110000010001101"

With 3 eggs:

dec_1187_encryptedeggs "00111011101000010101110101111010110101001110001001100010000011001001010000100000111011011001101101100"

With 4 eggs:

dec_1187_encryptedeggs "00110101001001001101011101101001000000110001110001111010011010000000110101011001110111010110010011111"

With 5 eggs:

dec_1187_encryptedeggs "01000110011001000001111101100001101101110000111000011110000100011100101011000001001100001010110100011"

With 6 eggs:

dec_1187_encryptedeggs "00111011001001110101011111110111011000001001101111001011011110011000110100101100110111000001001000100"

With 7 eggs:

dec_1187_encryptedeggs "01001101011000110011110111110011101101011110010001010011111101011100011111000001000111111001100001001"

With 8 eggs:

dec_1187_encryptedeggs "01001111111000000011101011111111011101011111011111011101101001111101010111011100011001110011011010000"

With 9 eggs:

dec_1187_encryptedeggs "01110111101100101011000011110111011001111010010000110001100001110010010000110100011110010000000110100"

With 10 eggs:

dec_1187_encryptedeggs "01111010001010110101000101011111011010110000111010010101100001110011110101100011011000010010001110101"

With 11 eggs: (+ the one in 1187_farm_house)

dec_1187_encryptedeggs "00000100101011011111001001110011001010011111000000111101110100100110001110100011011101000110101100110"

Flashlight remains active after switching to weapons that don't support flashlight.

In the original mod, switching to a weapon that doesn't have flashlight support turns the flashlight off.

This does not happen as of the latest commit 65b7f11.

Note that the flashlight should remains active when switching between weapons that allow flashlight.

One possible implementation could be:

void CBaseCombatWeapon::DisableFlashlight(void)
{
#ifndef CLIENT_DLL
	if (!GetHasFlashlight() && GetOwner() && GetOwner()->IsPlayer())
	{
		CBasePlayer* pPlayer = ToBasePlayer(GetOwner());
		if (pPlayer->FlashlightIsOn())
		{
			pPlayer->FlashlightTurnOff();
		}
	}
#endif
}
bool CBaseHLCombatWeapon::Deploy( void )
{
	DisableFlashlight();
        DisableIronsights();
        ...
bool CBaseCombatWeapon::DefaultDeploy( char *szViewModel, char *szWeaponModel, int iActivity, char *szAnimExt )
{
	DisableFlashlight();
        DisableIronsights();
        ...

Please, can you review the reverse engineered code and see if there's anything around these areas ?

Enhanced vortigaunts perform wrong melee attack animations.

In the original game, enhanced vortigaunts perform a ground pound attack when the player is too close.

In the current build as of aada019 they play a kick animation.

Note: The regular vortigaunts perform a claw attack when the player is too close. This behavior is also in the current build so it's ok.

Player legs are not visible.

The original mod features a body visible in first person.

As of 685ee3b , legs don't render.

Startup hint :

In c_baseplayer.cpp, making C_BasePlayer::ShouldDrawThisPlayer() return true allows to render the player legs but they don't actually follow the player. This can be viewed using mat_wireframe 1 and by looking around. The legs position and distance away from the player depends on the map and where the player is located. Of note, this doesn't occur when using models/player.mdl.

So far, commenting out the following line in c_basehlplayer.cpp appears to make it work but I haven't yet checked why.

BuildFirstPersonMeathookTransformations( hdr, pos, q, cameraTransform, boneMask, boneComputed, "ValveBiped.Bip01_Head1" );

M4 firing interrupted briefly after the first shots.

In the original game, holding the attack key while equipped with the M4 will fire bullets at a constant rate.

In the current build as of aada019 holding the attack key will fire a few bullets, interrupt for about half a second, then continue at a constant rate.

Use OnCacheInteraction instead of OnPlayerPickup.

Some maps use OnPlayerPickup for the following weapons :

weapon_healthpack
weapon_kar98
weapon_knife
weapon_m16
weapon_m4
weapon_pistol
weapon_rpg
weapon_shotgun
weapon_smg1

OnPlayerPickup doesn't trigger when the player already has the weapon and full ammo. This can occur if the player uses impulse 101 and gets all ammunition.

An alternative could be to use OnCacheInteraction that's triggered whenever a player touches a weapon (even with full ammo) but this would require patching lump files to use it and then either :

A) Set the Fire once only to 1. This should be changing the last value -1 to 1.

"OnPlayerPickup" "johntrigger,Enable,,0,-1" <-- Change -1 to 1

B) Add a logic_relay, move all the output calls to it, set it to fire once, and call it by the original entity.

Fix player legs animation.

As of c989403

The decompiled code for the player legs has been added in eb871dc but the legs don't animate correctly - They currently always play the run animation.

If possible, see if the code can be simplified/reworked for more readability.

Mercenaries don't use the correct model.

I created a test map that has multiple mercenaries (npc_citizen) (each with only one spawnflag set at a time)

It looks like the spawnflag 524288 (1 << 19) is used to tell if the model must use merc_heavy.mdl or the regular ones. On the npc_citizen, this corresponds to Ammo Resupplier flag.

In the test map, the heavy merc is the 5th citizen starting from the upper left.

It likely wasn't fixed in the 2015 patch: malortie#8

Possible way to implement it:

#define SF_COMBINE_IS_MERC_HEAVY ( 1 << 19 ) // Could also be named SF_COMBINE_IS_ELITE to keep consitency with the CNPC_Combine class.

bool			IsElite() { return HasSpawnFlags( SF_COMBINE_IS_MERC_HEAVY ); }

test_merc_model.zip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.