Programming Pimpage Thread

Grab your favourite IDE and tinker with the innards of game engines

Re: Programming Pimpage Thread

Postby ScarT on Wed Jan 30, 2013 4:09 pm

You looked at the leaked 2007 source code for guidance, right :)? If not, you should :)
User avatar
ScarT
Senior Member
Senior Member
 
Joined: Sat Apr 02, 2005 7:33 pm
Location: Denmarkian Land

Re: Programming Pimpage Thread

Postby IBeMad on Wed Jan 30, 2013 6:04 pm

Everyone keeps telling me to but I have no idea where to find that shit.
IBeMad
Member
Member
 
Joined: Sun Jan 22, 2012 5:18 pm

Re: Programming Pimpage Thread

Postby zombie@computer on Wed Jan 30, 2013 6:09 pm

torrents. But you dont really need to. You can reconstruct most things from the sourcecode of the compile tools and hl2 itself (ie model file headers).

I tried making a hammer clone, and in fact im still working on it now and then. but its gotten to the point where it starts getting really annoying and boring. I think i touched the code 4 times in the last month or so.
When you are up to your neck in shit, keep your head up high
zombie@computer
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 31, 2004 5:58 pm
Location: Lent, Netherlands

Re: Programming Pimpage Thread

Postby ScarT on Wed Jan 30, 2013 7:21 pm

se2007_src.rar should be enough to find it.

z@c, that's the code you sent me, right? I never got it compiling because I'm using a newer version of Visual Studio, and couldn't be bothered to dig out 2008 to compile it :( I'd love to work on something like that, but I'm so unmotivated these days.
User avatar
ScarT
Senior Member
Senior Member
 
Joined: Sat Apr 02, 2005 7:33 pm
Location: Denmarkian Land

Re: Programming Pimpage Thread

Postby ErikKiller on Wed Jan 30, 2013 7:39 pm

Code: Select all
<html>
<body>
<h1>lol</h1>
</body>
</html>
Image
Image
First rodeo? Use the Source SDK Documentation for reference!
User avatar
ErikKiller
May Contain Skills
May Contain Skills
 
Joined: Sun Sep 09, 2007 4:05 pm
Location: Estonia

Re: Programming Pimpage Thread

Postby zombie@computer on Wed Jan 30, 2013 9:59 pm

ScarT wrote:se2007_src.rar should be enough to find it.

z@c, that's the code you sent me, right? I never got it compiling because I'm using a newer version of Visual Studio, and couldn't be bothered to dig out 2008 to compile it :( I'd love to work on something like that, but I'm so unmotivated these days.
Yea, that code. It does compile for me atm, so thats not a problem. Its just, like you, my motivation is gone.
When you are up to your neck in shit, keep your head up high
zombie@computer
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 31, 2004 5:58 pm
Location: Lent, Netherlands

Re: Programming Pimpage Thread

Postby stoopdapoop on Wed Jan 30, 2013 10:03 pm

yeah, working with source is a huge motivation killer :(
I'm Brown
Image
User avatar
stoopdapoop
Veteran
Veteran
 
Joined: Sun Aug 21, 2005 2:14 am
Location: Ann Arbor, MI

Re: Programming Pimpage Thread

Postby Armageddon on Wed Jan 30, 2013 11:02 pm

stoopdapoop wrote:yeah, working with source is a huge motivation killer :(

That's why, I stooped. hehe 8)
User avatar
Armageddon
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Sun Dec 14, 2008 5:53 am

Re: Programming Pimpage Thread

Postby IBeMad on Thu Jan 31, 2013 2:13 am

It depends on what you are trying to do with Source IMO. If you just want something that mostly works to fiddle with, it's a dream come true ;)
IBeMad
Member
Member
 
Joined: Sun Jan 22, 2012 5:18 pm

Re: Programming Pimpage Thread

Postby Stormy on Mon Feb 04, 2013 3:07 am

Someone hasn't used UDK. Or Unity. Or torque. Or phoenix...
User avatar
Stormy
May Contain Skills
May Contain Skills
 
Joined: Sun Nov 28, 2010 6:03 am
Location: Cairns, QLD, AUS

Re: Programming Pimpage Thread

Postby Gary on Thu May 16, 2013 8:44 pm

Image

Got bored. Gave the manhacks a gun. They also explode when you kill them :P


Also made it so the combine could jump:
Image

Which is pretty cool, cause if they need to hide and reload, they can get away easier. Also when they're hunting you down, it's pretty cool to watch them jump from the walkways above you :D


(I know these aren't impressive, the combine one is actually just one line of code :P )

Edit:
Combine ball emitting light(which also casts shadows):
Image
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: Programming Pimpage Thread

Postby LordDz on Thu May 16, 2013 10:52 pm

gief code.
User avatar
LordDz
May Contain Skills
May Contain Skills
 
Joined: Mon Sep 01, 2008 12:28 pm
Location: Hammer Crash Logs

Re: Programming Pimpage Thread

Postby Gary on Thu May 16, 2013 11:44 pm

For combine jumping:
Code: Select all
CapabilitiesAdd( bits_CAP_MOVE_JUMP);


ManHacks:
Code: Select all
//-----------------------------------------------------------------------------//
// Purpose: Shoot Shit
// Input  :
// Output :
//-----------------------------------------------------------------------------//
// Vars

float   m_flTimeNextShoot;
float   m_flTimeLastShoot;
int      m_iRoundsFired;
Vector   m_vecSpread;

// Func
void CNPC_Manhack::FireLasers()
{ //gary

   //Can't shoot if I got nothing to shoot at
   if (!GetEnemy()) return;
   
   //Can't shoot if we can't see our target
   if ( !HasCondition( COND_SEE_ENEMY ) || HasCondition( COND_ENEMY_OCCLUDED ) ) return;

   //Cool down
   if ( gpGlobals->curtime - m_flTimeLastShoot > 1.5 ) m_iRoundsFired = 0;

   //Can we shoot the next round yet?
   if ( m_iRoundsFired >= 10 ) return;   //Max Rounds Per Burst
   if ( ( gpGlobals->curtime - m_flTimeLastShoot < 0.04 ) && m_iRoundsFired > -1 ) return; //Rate of Fire (time between rounds)



   m_flEngineStallTime = gpGlobals->curtime + 0.01f;
   StopBurst( true );
   SetEyeState( MANHACK_EYE_STATE_CHARGE );

   // Let's aim at our target now
   
   FireBulletsInfo_t info;

   Vector vecSrc = EyePosition();
   Vector vecDir;

   GetVectors( &vecDir, NULL, NULL );

   info.m_vecSrc = vecSrc;
   info.m_vecDirShooting = Vector( vecDir.x, vecDir.y, GetActualShootTrajectory( vecSrc ).z ),
   info.m_vecSpread = VECTOR_CONE_PRECALCULATED;
   info.m_iTracerFreq = 1;
   info.m_iShots = 1;
   info.m_pAttacker = this;
   info.m_flDistance = MAX_COORD_RANGE;
   info.m_iAmmoType = GetAmmoDef()->Index( "PISTOL" );

   FireBullets( info );

   // Do the AR2 muzzle flash
   CEffectData data;
   data.m_nEntIndex = entindex();
   data.m_nAttachmentIndex = LookupAttachment( "eyes" );
   data.m_flScale = 0.6f;
   data.m_fFlags = MUZZLEFLASH_COMBINE;
   DispatchEffect( "MuzzleFlash", data );
   //light for muzzleflash
   CBroadcastRecipientFilter filter;
   te->DynamicLight( filter, 0.0, &GetAbsOrigin(), 10, 180, 200, 0, 255, 0.1, 0 );
   //Sound
   EmitSound( "Weapon_AR2.Single" );


   m_flTimeLastShoot = gpGlobals->curtime;
   m_iRoundsFired++;
}


The manhack code is heavy WIP. I just tossed it together. EDIT: The manhack code is done wrong, cause manhacks share the round count...
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: Programming Pimpage Thread

Postby Gary on Fri May 17, 2013 12:23 am

Slightly more work...
Image
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: Programming Pimpage Thread

Postby stoopdapoop on Sat May 18, 2013 7:46 pm

gary, if you declare those vars in class declaration for the manhacks then they won't all share the same ones.

You'll probably want to initialize them in the constructor though. I'm not sure if Source zero's memory before using it for entities, but it probably doesn't and you don't want them filled with garbage. If m_shotsFired starts off greater than 10, and if m_flTimeLastShoot is a lot greater than curtime, then the manhacks won't fire until curtime passes TimeLastShoot, which could potentially be a very very very long time.
I'm Brown
Image
User avatar
stoopdapoop
Veteran
Veteran
 
Joined: Sun Aug 21, 2005 2:14 am
Location: Ann Arbor, MI
PreviousNext

Return to Programming

Who is online

Users browsing this forum: No registered users