Ripping code ...

DXX Rebirth Descent I/II for modern systems, maintains the look and feel of the original. Home Page

Moderator: zico

Locked
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Ripping code ...

Post 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
User avatar
CDN_Merlin
DBB_Master
DBB_Master
Posts: 9781
Joined: Thu Nov 05, 1998 12:01 pm
Location: Capital Of Canada

Post by CDN_Merlin »

Shouldn't this be taken to PMs?
User avatar
Bakdraft
DBB Ace
DBB Ace
Posts: 66
Joined: Tue Jan 09, 2007 12:02 pm

Post by Bakdraft »

I believe this has already been addressed elsewhere.

http://dxx-rebirth.de/smf/index.php?top ... 74#msg1374
User avatar
Duper
DBB Master
DBB Master
Posts: 9214
Joined: Thu Nov 22, 2001 3:01 am
Location: Beaverton, Oregon USA

Post 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.
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post 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.
User avatar
fliptw
DBB DemiGod
DBB DemiGod
Posts: 6459
Joined: Sat Oct 24, 1998 2:01 am
Location: Calgary Alberta Canada

Post by fliptw »

why are you complaining about zico using code that came from the original D2x, and claiming it as your own?
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post 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.
User avatar
Testiculese
DBB Material Defender
DBB Material Defender
Posts: 4689
Joined: Sun Nov 11, 2001 3:01 am

Re:

Post 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? :)
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Re:

Post 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.
User avatar
Testiculese
DBB Material Defender
DBB Material Defender
Posts: 4689
Joined: Sun Nov 11, 2001 3:01 am

Post by Testiculese »

Whoops, you missed it, I was joking on \"given due credit for it.\" (I can read code as fast as you.)
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Re:

Post 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:
MD-2389
Defender of the Night
Defender of the Night
Posts: 13477
Joined: Thu Nov 05, 1998 12:01 pm
Location: Olathe, KS
Contact:

Post 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.
User avatar
Tankie2
DBB Ace
DBB Ace
Posts: 87
Joined: Tue Jun 12, 2001 2:01 am

Post 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.
User avatar
Diedel
D2X Master
D2X Master
Posts: 5278
Joined: Thu Nov 05, 1998 12:01 pm
Contact:

Post by Diedel »

It was always so that the missile does not necessarily target the object closest to your reticle.
zico
DXX Master
DXX Master
Posts: 229
Joined: Wed Sep 07, 2005 8:11 am

Post 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
Locked