funny comments on source code

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

Re: funny comments on source code

Post by Kameleon » 20 Mar 2016, 06:39

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: 789
Joined: 23 Feb 2015, 13:05

Re: funny comments on source code

Post by Daggolin » 25 Mar 2016, 12:46

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: 954
Joined: 24 Feb 2015, 08:21
Contact:

Re: funny comments on source code

Post by Boothand » 25 Mar 2016, 17:05

Hah, love this.

User avatar
fau
Staff
Posts: 414
Joined: 16 Aug 2015, 01:01
Location: Warsaw / Poland
Contact:

Re: funny comments on source code

Post by fau » 25 Mar 2016, 17:23

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: 581
Joined: 23 Feb 2015, 13:03
Location: Gliese581c

Re: funny comments on source code

Post by ouned » 25 Mar 2016, 21:31

tfw bot was never running from me in all these years :(

User avatar
Daggolin
Administrator
Posts: 789
Joined: 23 Feb 2015, 13:05

Re: funny comments on source code

Post by Daggolin » 25 Mar 2016, 21:33

So you're not scary enough for the bot to turn into a ChickenWuss. ^^

User avatar
Daggolin
Administrator
Posts: 789
Joined: 23 Feb 2015, 13:05

Re: funny comments on source code

Post by Daggolin » 25 Mar 2016, 23:56

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 » 28 Mar 2016, 12:30

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: 789
Joined: 23 Feb 2015, 13:05

Re: funny comments on source code

Post by Daggolin » 27 Apr 2016, 19:27

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: 425
Joined: 26 Feb 2015, 12:25
Location: Chile
Contact:

Re: funny comments on source code

Post by Tr!Force » 30 Apr 2016, 00:32

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
  • In-Game Nick Name: Tr!Force
  • JK2 & JK3 Code-Mod Developer
  • Jedi Knight Plus Mod Project: Click Here
  • E-Mail: triforce@gznetwork.com

User avatar
Daggolin
Administrator
Posts: 789
Joined: 23 Feb 2015, 13:05

Re: funny comments on source code

Post by Daggolin » 03 May 2016, 16:03

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: 789
Joined: 23 Feb 2015, 13:05

Re: funny comments on source code

Post by Daggolin » 03 May 2016, 16:08

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: 425
Joined: 26 Feb 2015, 12:25
Location: Chile
Contact:

Re: funny comments on source code

Post by Tr!Force » 09 May 2016, 12:51

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
  • In-Game Nick Name: Tr!Force
  • JK2 & JK3 Code-Mod Developer
  • Jedi Knight Plus Mod Project: Click Here
  • E-Mail: triforce@gznetwork.com

User avatar
Daggolin
Administrator
Posts: 789
Joined: 23 Feb 2015, 13:05

Re: funny comments on source code

Post by Daggolin » 09 May 2016, 16:49

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: 789
Joined: 23 Feb 2015, 13:05

Re: funny comments on source code

Post by Daggolin » 15 May 2016, 23:22

Code: Select all

#define PROPER_THROWN_VALUE 999 //Ah, well.. 

User avatar
Tr!Force
Posts: 425
Joined: 26 Feb 2015, 12:25
Location: Chile
Contact:

Re: funny comments on source code

Post by Tr!Force » 16 May 2016, 18:27

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
  • In-Game Nick Name: Tr!Force
  • JK2 & JK3 Code-Mod Developer
  • Jedi Knight Plus Mod Project: Click Here
  • E-Mail: triforce@gznetwork.com

User avatar
Daggolin
Administrator
Posts: 789
Joined: 23 Feb 2015, 13:05

Re: funny comments on source code

Post by Daggolin » 16 May 2016, 20:15

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: 954
Joined: 24 Feb 2015, 08:21
Contact:

Re: funny comments on source code

Post by Boothand » 16 May 2016, 21:53

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: 789
Joined: 23 Feb 2015, 13:05

Re: funny comments on source code

Post by Daggolin » 02 Jun 2016, 01:20

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

Who is online

Users browsing this forum: No registered users and 4 guests

Created by Matti from StylesFactory.pl and Warlords of Draenor (modified by jk2.info)
Powered by phpBB® Forum Software © phpBB Limited
GZIP: On
 

 

cron