Just Flipped Some Values Of Defaults
#3577 posted by
ranger on 2025/01/23 05:37:16
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
#3578 posted by
Preach on 2025/01/23 08:30:15
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
#3579 posted by
ranger on 2025/01/23 11:28:06
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
#3580 posted by
Preach on 2025/01/24 00:34:02
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?
#3581 posted by
ranger on 2025/01/24 10:32:09
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
#3582 posted by
ranger on 2025/01/24 10:37:50
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
#3583 posted by
ranger on 2025/01/24 10:41:35
*without line by line trial and error
Guess You're Not Wanting To Help Resolve These 2 Issues...
#3584 posted by
ranger on 2025/01/25 17:14:03