Page 2 of 2

Re: funny comments on source code

Posted: 20 Mar 2016, 06:39
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 :)

Re: funny comments on source code

Posted: 25 Mar 2016, 12:46
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)

Re: funny comments on source code

Posted: 25 Mar 2016, 17:05
by Boothand
Hah, love this.

Re: funny comments on source code

Posted: 25 Mar 2016, 17:23
by fau
I always spawn Desann + Tavion and get scared that I broke something when Tavion totally ignores Dessan. Getting caught every time.

Re: funny comments on source code

Posted: 25 Mar 2016, 21:31
by ouned
tfw bot was never running from me in all these years :(

Re: funny comments on source code

Posted: 25 Mar 2016, 21:33
by Daggolin
So you're not scary enough for the bot to turn into a ChickenWuss. ^^

Re: funny comments on source code

Posted: 25 Mar 2016, 23:56
by Daggolin
Or to put it in other words ouned: "dramatic failure":

Code: Select all

trap_S_StartLocalSound(cgs.media.dramaticFailure, CHAN_LOCAL);

Re: funny comments on source code

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

Re: funny comments on source code

Posted: 27 Apr 2016, 19:27
by Daggolin
Not a comment either:

Code: Select all

static void WP_CreateFlechetteBouncyThing( vec3_t start, vec3_t fwd, gentity_t *self )

Re: funny comments on source code

Posted: 30 Apr 2016, 00:32
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:

Re: funny comments on source code

Posted: 03 May 2016, 16:03
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;
			}

Re: funny comments on source code

Posted: 03 May 2016, 16:08
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;

Re: funny comments on source code

Posted: 09 May 2016, 12:51
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.

Re: funny comments on source code

Posted: 09 May 2016, 16:49
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.

Re: funny comments on source code

Posted: 15 May 2016, 23:22
by Daggolin

Code: Select all

#define PROPER_THROWN_VALUE 999 //Ah, well.. 

Re: funny comments on source code

Posted: 16 May 2016, 18:27
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

Re: funny comments on source code

Posted: 16 May 2016, 20:15
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;
	}

Re: funny comments on source code

Posted: 16 May 2016, 21:53
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.

Re: funny comments on source code

Posted: 02 Jun 2016, 01:20
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