News | Forum | People | FAQ | Links | Search | Register | Log in
Coding Help
This is a counterpart to the "Mapping Help" thread. If you need help with QuakeC coding, or questions about how to do some engine modification, this is the place for you! We've got a few coders here on the forum and hopefully someone knows the answer.
First | Previous | Next | Last
Just Flipped Some Values Of Defaults 
float (entity targ) visible =
{
local vector spot1;
local vector spot2;

spot1 = self.origin + self.view_ofs;
spot2 = targ.origin + targ.view_ofs;
traceline (spot1, spot2, TRUE, self); // see through other monsters

if (trace_inopen && trace_inwater)
return (TRUE); //was FALSE, sight line crossed contents
if (trace_fraction == TRUE) // Direct line of sight
return (TRUE);

return (FALSE);
};

I think the problem is due is id never intended monsters to see through water if their code 
No No No 
For the third time, this is a bug entirely of your own making because you haven't thought through what you've doing.

Read my previous post, which anticipated the code you'd changed and the change you made. I carefully described exactly what the unmodified code does in plain English.

If part of the trace is in the open air and part of the trace is in the water, then the answer to the question of whether the monster can see its target is NO (because the line of sight passed through the surface of the water).

Look at the change you've made to that portion of the code, and make the corresponding change to that paragraph of text. Then post the paragraph of text. 
I Don't Understand What's Going On 
Preach, dude I appreciate you helping me out lot before man, but now feels like there's passive aggressiveness .... I don't get where it's coming from?

I suggested you could just tell me the code fix, as opposed to trying to explain the programming theory behind it... I obviously am not a programmer 
Hmm 
Here's where I disagree. You are a programmer, you're writing a mod. And you need to learn a bit of humility, especially at this early stage. Before you assume there's some obscure bug in Quake, maybe pause and ask if you could have introduced the bug yourself.

This thread does not come with a Service Level Agreement, and I think it's reasonable to try and get you to solve a few more problems yourself. I'm trying to help you help yourself here, and I don't think I'm setting you an problem you can't complete.

To keep things moving, here's the English translation of your code:

If part of the trace is in the open air and part of the trace is in the water, then the answer to the question of whether the monster can see its target is YES (because the line of sight passed through the surface of the water).

Can you see the problem with this yet? 
 
Honestly I don't really see... Is it because there's no explicit check for brush under the water?

Regardless if I know the "code to English translation", I still wouldn't know the solution 
Separate Note, You're Not Gonna Believe This 
My mod is actually lagging sometimes and I don't know what causes it??

It's not due to map brushwork.

All I know is it doesn't lag if I look away from roughly the center of the map

Is there any way for me to diagnose this cause, without having reverting my code line by line ?trial and error? 
Typo 
*without line by line trial and error 
Guess You're Not Wanting To Help Resolve These 2 Issues... 
 
First | Previous | Next | Last
You must be logged in to post in this thread.
Website copyright © 2002-2025 John Fitzgibbons. All posts are copyright their respective authors.