Need some help to finalize AmigaOS4 port of AssaultCube
#28
@Tempest
You rokz hard ! It works ! I kick some asses for now in multiplayer + no more "fire in the air" ! Thankt a lot !

Maybe you can also help me with the same replacement, but for Cube1 ? There is how function looks like for cube1:

Quote:// find out the 3d target of the crosshair in the world easily and very acurately.
// sadly many very old cards and drivers appear to fuck up on glReadPixels() and give false
// coordinates, making shooting and such impossible.
// also hits map entities which is unwanted.
// could be replaced by a more acurate version of monster.cpp los() if needed

void readdepth(int w, int h)
{
glReadPixels(w/2, h/2, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &cursordepth);
double worldx = 0, worldy = 0, worldz = 0;
gluUnProject(w/2, h/2, depthcorrect(cursordepth), mm, pm, viewport, &worldx, &worldz, &worldy);
worldpos.x = (float)worldx;
worldpos.y = (float)worldy;
worldpos.z = (float)worldz;
vec r = { (float)mm[0], (float)mm[4], (float)mm[8] };
vec u = { (float)mm[1], (float)mm[5], (float)mm[9] };
setorient(r, u);
};

and setorient() its:

Quote:vec right, up;
void setorient(vec &r, vec &u) { right = r; up = u; };

We have released cube1 for os4 already, but because of the same choords bug we cant "fire" normally. If you can help here in the same way, it will be just uber-cool.

Btw, related to assault cube, i still have problems with "pistols". And with default one (1 gun), and with pistol-pack with 1 gun per hand. I.e. i see it in hands, i can choice it by pressing "2" key, but when i press mouse button for fire, nothing happens. I.e. like just empty or kind (but it is not). Did automat and postol handles different by code in term of GL calls or kind ?
Thanks given by:


Messages In This Thread
RE: Need some help to finalize AmigaOS4 port of AssaultCube - by kas1e - 16 Nov 10, 11:24AM