Page 1 of 1

Ripping code ...

Posted: Wed Feb 14, 2007 11:30 am
by Diedel
Zico,

Code: Select all

#define LIMIT_HOMERS	1
#define HOMER_MAX_FPS	30
#define HOMER_MIN_DELAY (1000 / HOMER_MAX_FPS)

//--------------------------------------------------------------------
//	Set object *objp's orientation to (or towards if I'm ambitious) its velocity.
void homing_missile_turn_towards_velocity(object *objp, vms_vector *norm_vel)
{
	vms_vector	new_fvec;

#ifdef LIMIT_HOMERS
	static time_t   last_time = -1;
	static int nFrames = 1;
	time_t this_time, delta_time;
	fix frame_time;
	int fps;
	if (last_time == -1) {
		last_time = clock ();
		frame_time = FrameTime;
	} else {
		nFrames++;
		this_time = clock ();
		delta_time = this_time - last_time;
		if (delta_time < HOMER_MIN_DELAY) {
			return;
		} else {
			fps = (1000 + delta_time / 2) / delta_time;
			frame_time = fps ? (f1_0 + fps / 2) / fps : f1_0;
			//                     frame_time /= nFrames;
			nFrames = 0;
			last_time = this_time;
		}
	}
#else
	fix frame_time = FrameTime;
#endif
Sure, D2X-XL is GPL, but if you rip code from D2X-XL, you still ought to have at least the decency to give due credit to the author.

I wonder how much other stuff you took from D2X-XL w/o dropping a single word about it.

Diedel

Posted: Wed Feb 14, 2007 1:44 pm
by CDN_Merlin
Shouldn't this be taken to PMs?

Posted: Wed Feb 14, 2007 1:46 pm
by Bakdraft
I believe this has already been addressed elsewhere.

http://dxx-rebirth.de/smf/index.php?top ... 74#msg1374

Posted: Wed Feb 14, 2007 8:46 pm
by Duper
oh come on.

Posting here was unnecessary if it's already been addressed on the DXX forum.

If you have a real beef, bring in a couple of others to moderate a discourse.

thanks Bakdraft.

Posted: Thu Feb 15, 2007 8:20 am
by Diedel
If you look at the post dates, you will notice that I posted on dxx-rebirth after having posted here, because it had come to my mind that that would be a better place. You can delete my post(s) here if you want to.

Posted: Thu Feb 15, 2007 12:56 pm
by fliptw
why are you complaining about zico using code that came from the original D2x, and claiming it as your own?

Posted: Thu Feb 15, 2007 1:59 pm
by Diedel
It doesn't come from the original D2X, It is definitely my code; but it can be that it stems from a time when I was still contributing to the main D2X project. If that is so, zico couldn't know that. I also wouldn't complain about someone using my code, I'd only complain if I wouldn't be given due credit for it.

Re:

Posted: Thu Feb 15, 2007 2:29 pm
by Testiculese
Diedel wrote:It doesn't come from the original D2X, It is definitely my code; but it can be that it stems from a time when I was still contributing to the main D2X project. If that is so, zico couldn't know that. I also wouldn't complain about someone using my code, I'd only complain if I wouldn't be given due credit for it.
Why waste code space with comments, eh? :)

Re:

Posted: Thu Feb 15, 2007 4:21 pm
by Diedel
Testiculese wrote:Why waste code space with comments, eh? :)
How the heck did you know ... ? :P

That code limits homing missile turn rate handling to 30 fps.

Posted: Thu Feb 15, 2007 5:40 pm
by Testiculese
Whoops, you missed it, I was joking on \"given due credit for it.\" (I can read code as fast as you.)

Re:

Posted: Thu Feb 15, 2007 6:33 pm
by Diedel
Testiculese wrote:Whoops, you missed it, I was joking on "given due credit for it." (I can read code as fast as you.)
I don't think I missed it. I was joking back. My half sentence finishes "... about my ugly commenting habits?" ;) (A feeble attempt of making fun of myself ... :roll: )

Tsk. You guys here just never understand me ... :wink:

Posted: Thu Feb 15, 2007 9:18 pm
by MD-2389
Heres a novel idea: If you have a dispute with someone, save it for PM or IM. We don't care about your little melodrama.

By the way, if you're going to accuse someone of stealing something, atleast get it right.

Posted: Thu Feb 15, 2007 9:31 pm
by Tankie2
I was under the impression the new turn rate is 40 fps, not 30 fps. However, I'm fine with 60 FPS. I have a bigger problem with fact that the homing missiles in D2 don't lock onto the target in the reticle and instead home in on the targets using some other protocol. IN anarchy I believe it's the first target in the players list instead of the one in your reticle, for robots I think it's something similar, not necessarily the closest robot and rarely the one you're trying to target.

Posted: Fri Feb 16, 2007 3:23 am
by Diedel
It was always so that the missile does not necessarily target the object closest to your reticle.

Posted: Fri Feb 16, 2007 10:54 am
by zico
No problem about crossposting, copy/paste is easy:

a) this code comes from D2X: http://cvs.icculus.org/cvs/d2x/main/las ... 10&r2=1.11

b) however it's not working correctly/ is broken so do not have any fear it'll be removed soon.

c) the license of your engine is NOT GPL and DOES allow you to keep the source for yourself

d) if you want to spread up such things, please do it private

e) closed