funny comments on source code

Discussions about modding, questions, mod requests or just show off what you're working on.
Kevin
Administrator
Posts: 393
Joined: 07 Jun 2015, 08:36

Re: funny comments on source code

Post by Kevin »

Tr!Force wrote:offtopic: how mvsdk is going? im tired to copy & paste same mod code in 1.02 and 1.04 sources :?
Just put all of your focus on fine tuning the 1.04 version, and then port it to mvsdk when it is done; porting it to 1.02 as well, if you intend to use the mvsdk at least, is double the work for no reason :)
User avatar
Daggolin
Administrator
Posts: 794
Joined: 23 Feb 2015, 13:05

Re: funny comments on source code

Post by Daggolin »

From the AI code (not even comments, but actual code):

Code: Select all

		bChicken = BotIsAChickenWuss(bs);
		bs->runningToEscapeThreat = bChicken;

Code: Select all

	if (bs->chickenWussCalculationTime > level.time)
	{
		return 2; //don't want to keep going between two points...
	}

Code: Select all

	//didn't run, reset the timer
	bs->chickenWussCalculationTime = 0;

Code: Select all


	if ((level.time - bs->escapeDirTime) > 4000)
	{
		badthing = GetNearestBadThing(bs);
	}
	else
	{
		badthing = NULL;
	}

Code: Select all

int GetLoveLevel(bot_state_t *bs, bot_state_t *love)

Code: Select all

void BotLovedOneDied(bot_state_t *bs, bot_state_t *loved, int lovelevel)
User avatar
Boothand
Administrator
Posts: 986
Joined: 24 Feb 2015, 08:21
Contact:

Re: funny comments on source code

Post by Boothand »

Hah, love this.
User avatar
fau
Staff
Posts: 433
Joined: 16 Aug 2015, 01:01
Location: Warsaw / Poland
Contact:

Re: funny comments on source code

Post by fau »

I always spawn Desann + Tavion and get scared that I broke something when Tavion totally ignores Dessan. Getting caught every time.
User avatar
ouned
Administrator
Posts: 596
Joined: 23 Feb 2015, 13:03
Location: Gliese581c

Re: funny comments on source code

Post by ouned »

tfw bot was never running from me in all these years :(
User avatar
Daggolin
Administrator
Posts: 794
Joined: 23 Feb 2015, 13:05

Re: funny comments on source code

Post by Daggolin »

So you're not scary enough for the bot to turn into a ChickenWuss. ^^
User avatar
Daggolin
Administrator
Posts: 794
Joined: 23 Feb 2015, 13:05

Re: funny comments on source code

Post by Daggolin »

Or to put it in other words ouned: "dramatic failure":

Code: Select all

trap_S_StartLocalSound(cgs.media.dramaticFailure, CHAN_LOCAL);
User avatar
Miso
Posts: 170
Joined: 24 Feb 2015, 02:41
Location: Massachusetts / United States

Re: funny comments on source code

Post by Miso »

ouned wrote:you dont want to see what sort of things i wrote back when i was ~16
I remember seeing tons of "lololololololololololololololololololololololololololololololol" in Twimod :P

I know in my JJ Duel Mod, there were a couple of simple cvars I ported over but renamed them to very dumb things at first.
For instance, my jj_ignorekick cvar used to be "jj_kickhimintheface" when I first put it in. I don't remember the others off the top of my head but I still have all the old src's that I could probably find all of them ^^
Jj.miso
User avatar
Daggolin
Administrator
Posts: 794
Joined: 23 Feb 2015, 13:05

Re: funny comments on source code

Post by Daggolin »

Not a comment either:

Code: Select all

static void WP_CreateFlechetteBouncyThing( vec3_t start, vec3_t fwd, gentity_t *self )
User avatar
Tr!Force
Posts: 433
Joined: 26 Feb 2015, 12:25
Location: Chile
Contact:

Re: funny comments on source code

Post by Tr!Force »

Daggolin wrote:Not a comment either:

Code: Select all

static void WP_CreateFlechetteBouncyThing( vec3_t start, vec3_t fwd, gentity_t *self )
bouncy thing :lol:
Image
"The dark side? I've been there. Do your worst." - Kyle Katarn
  • JK2 & JK3 Code-Mod Developer
  • Jedi Knight Plus Mod Project: Click Here
  • E-Mail: triforce@gznetwork.com
  • Discord: TriForce#8785
User avatar
Daggolin
Administrator
Posts: 794
Joined: 23 Feb 2015, 13:05

Re: funny comments on source code

Post by Daggolin »

I want out: another not-a-comment code-piece. ;)

Code: Select all

if (cg_cameraMode.integer) {
				iwantout = 1;

				
				// goto minimal_add;
				
				// NOTENOTE Temporary
				return;
			}
User avatar
Daggolin
Administrator
Posts: 794
Joined: 23 Feb 2015, 13:05

Re: funny comments on source code

Post by Daggolin »

Speaking of temporary things or things that need to be done properly at some point sometimes end up staying the way they were not meant to stay. Not really funny, but just stumbled upon this anyway:

Code: Select all

	//This call is mainly just to reconstruct the skeleton. But we'll get the left hand matrix while we're at it.
	//If we don't reconstruct the skeleton after setting the bone angles, we will get bad bolt points on the model
	//(e.g. the weapon model bolt will look "lagged") if there's no other GetBoltMatrix call for the rest of the
	//frame. Yes, this is stupid and needs to be fixed properly.
	//The current solution is to force it not to reconstruct the skeleton for the first GBM call in G2PlayerAngles.
	//It works and we end up only reconstructing it once, but it doesn't seem like the best solution.
	trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_lhand, &lHandMatrix, cent->turAngles, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale);
	gotLHandMatrix = qtrue;
User avatar
Tr!Force
Posts: 433
Joined: 26 Feb 2015, 12:25
Location: Chile
Contact:

Re: funny comments on source code

Post by Tr!Force »

thats reminds me the atst command :lol:

Code: Select all

//I broke the ATST when I restructured it to use a single global anim set for all client animation.
	//You can fix it, but you'll have to implement unique animations (per character) again.
Image
"The dark side? I've been there. Do your worst." - Kyle Katarn
  • JK2 & JK3 Code-Mod Developer
  • Jedi Knight Plus Mod Project: Click Here
  • E-Mail: triforce@gznetwork.com
  • Discord: TriForce#8785
User avatar
Daggolin
Administrator
Posts: 794
Joined: 23 Feb 2015, 13:05

Re: funny comments on source code

Post by Daggolin »

Yes, jk2 0.54 had a working atst in MP. As of 0.55 it is broken I think. But it's not hard to reintroduce "unique animations". Although I personally did that "for player" instead of "for character". But the rest of the atst is still in the code and working. Tried it out on 1.04 a few years ago.
User avatar
Daggolin
Administrator
Posts: 794
Joined: 23 Feb 2015, 13:05

Re: funny comments on source code

Post by Daggolin »

Code: Select all

#define PROPER_THROWN_VALUE 999 //Ah, well.. 
User avatar
Tr!Force
Posts: 433
Joined: 26 Feb 2015, 12:25
Location: Chile
Contact:

Re: funny comments on source code

Post by Tr!Force »

Daggolin wrote:

Code: Select all

#define PROPER_THROWN_VALUE 999 //Ah, well.. 
haha

Code: Select all

// Should probably trace from the mouth, but, ah well.
gi.trace( &tr, NPC->currentOrigin, vec3_origin, vec3_origin, end, NPC->s.number, MASK_SHOT );

haha and look this one:

Code: Select all

// I fucking hate this pragma shit
#pragma warning(disable : 4786)     // shut the fuck up about debug symbol name length
Image
"The dark side? I've been there. Do your worst." - Kyle Katarn
  • JK2 & JK3 Code-Mod Developer
  • Jedi Knight Plus Mod Project: Click Here
  • E-Mail: triforce@gznetwork.com
  • Discord: TriForce#8785
User avatar
Daggolin
Administrator
Posts: 794
Joined: 23 Feb 2015, 13:05

Re: funny comments on source code

Post by Daggolin »

Ever wondered why dualblade looks weird movement-wise? As in animations not smoothly ending, but jumping into the standing animation instantly?

Code: Select all

	if (BG_InSaberStandAnim(anim) && pm->ps->weapon == WP_SABER && pm->ps->dualBlade)
	{ //a bit of a hack, but dualblade is cheat-only anyway
		anim = BOTH_STAND1;
	}
User avatar
Boothand
Administrator
Posts: 986
Joined: 24 Feb 2015, 08:21
Contact:

Re: funny comments on source code

Post by Boothand »

I think I changed that, somehow, last time I modded. Switched an animation or so, and it was smooth, if I remember correctly. Never managed to alter the sick update rate of the doublestick though.
User avatar
Daggolin
Administrator
Posts: 794
Joined: 23 Feb 2015, 13:05

Re: funny comments on source code

Post by Daggolin »

Code: Select all

	// make absolutely sure that it can't back up the path.
	// The searchpaths do guarantee that something will always
	// be prepended, so we don't need to worry about "c:" or "//limbo" i
Post Reply
Created by Matti from StylesFactory.pl and Warlords of Draenor (modified by jk2.info)
Powered by phpBB® Forum Software © phpBB Limited
 

 

cron