So the problem is that when a player interacts with func_water it is a bit more complex than just your generic entity ::touch.
The engine calls the PM function PM_CheckWater to check whether or not the player is interacting with water and the depth he is at (and what type of water it is). The func_water entity index is never passed in any way when the player is "touching" the water. It is only concerned about waterlevel and watertype.
Spoiler
Code:
/*
=============
PM_CheckWater
Sets pmove->waterlevel and pmove->watertype values.
=============
*/
qboolean PM_CheckWater ()
{
vec3_t point;
int cont;
int truecont;
float height;
float heightover2;
// Pick a spot just above the players feet.
point[0] = pmove->origin[0] + (pmove->player_mins[pmove->usehull][0] + pmove->player_maxs[pmove->usehull][0]) * 0.5;
point[1] = pmove->origin[1] + (pmove->player_mins[pmove->usehull][1] + pmove->player_maxs[pmove->usehull][1]) * 0.5;
point[2] = pmove->origin[2] + pmove->player_mins[pmove->usehull][2] + 1;
// Assume that we are not in water at all.
pmove->waterlevel = 0;
pmove->watertype = CONTENTS_EMPTY;
// Grab point contents.
cont = pmove->PM_PointContents (point, &truecont );
// Are we under water? (not solid and not empty?)
if (cont <= CONTENTS_WATER && cont > CONTENTS_TRANSLUCENT )
{
// Set water type
pmove->watertype = cont;
// We are at least at level one
pmove->waterlevel = 1;
height = (pmove->player_mins[pmove->usehull][2] + pmove->player_maxs[pmove->usehull][2]);
heightover2 = height * 0.5;
// Now check a point that is at the player hull midpoint.
point[2] = pmove->origin[2] + heightover2;
cont = pmove->PM_PointContents (point, NULL );
// If that point is also under water...
if (cont <= CONTENTS_WATER && cont > CONTENTS_TRANSLUCENT )
{
// Set a higher water level.
pmove->waterlevel = 2;
// Now check the eye position. (view_ofs is relative to the origin)
point[2] = pmove->origin[2] + pmove->view_ofs[2];
cont = pmove->PM_PointContents (point, NULL );
if (cont <= CONTENTS_WATER && cont > CONTENTS_TRANSLUCENT )
pmove->waterlevel = 3; // In over our eyes
}
// Adjust velocity based on water current, if any.
if ( ( truecont <= CONTENTS_CURRENT_0 ) &&
( truecont >= CONTENTS_CURRENT_DOWN ) )
{
// The deeper we are, the stronger the current.
static vec3_t current_table[] =
{
{1, 0, 0}, {0, 1, 0}, {-1, 0, 0},
{0, -1, 0}, {0, 0, 1}, {0, 0, -1}
};
VectorMA (pmove->basevelocity, 50.0*pmove->waterlevel, current_table[CONTENTS_CURRENT_0 - truecont], pmove->basevelocity);
}
}
return pmove->waterlevel > 1;
}