Alright sorry.
I was sorta in a rush..
I'll go look for the code right now.
I only tested if it auto added button flags and it didn't so that part is working.
But i didn't delete it all. I only delete the part that checks for if a button is near.
I'll go look through the code again and see what I changed and post it. I'm on a different computer right now... I keep getting kicked off of my fast computer :'(
[edit]
in bot.cpp around line 996 find:
Code:
if ((strcmp ("func_button", STRING (pent->v.classname)) == 0)
&& (strncmp ("cam", STRING (pent->v.target), 3) != 0))
{
bCanPickup = TRUE;
iPickType = PICKUP_BUTTON;
}
and change it to:
Code:
/* if ((strcmp ("func_button", STRING (pent->v.classname)) == 0)
&& (strncmp ("cam", STRING (pent->v.target), 3) != 0))
{
bCanPickup = TRUE;
iPickType = PICKUP_BUTTON;
}*/
in waypoint.cpp around line 394 find:
Code:
while (!FNullEnt (pent = FIND_ENTITY_IN_SPHERE (pent, pHostEdict->v.origin, radius)))
{
strcpy (item_name, STRING (pent->v.classname));
if ((strcmp ("func_button", item_name) == 0)
&& (strncmp ("cam", STRING (pent->v.target), 3) != 0))
{
UTIL_HostPrint (HUD_PRINTCENTER, "Button detected. Setting Flag!\n");
p->flags = W_FL_USE_BUTTON;
}
}
and change it to:
Code:
/* while (!FNullEnt (pent = FIND_ENTITY_IN_SPHERE (pent, pHostEdict->v.origin, radius)))
{
strcpy (item_name, STRING (pent->v.classname));
if ((strcmp ("func_button", item_name) == 0)
&& (strncmp ("cam", STRING (pent->v.target), 3) != 0))
{
UTIL_HostPrint (HUD_PRINTCENTER, "Button detected. Setting Flag!\n");
p->flags = W_FL_USE_BUTTON;
}
}*/
also in waypoint.cpp around line 218 find:
Code:
char item_name[64];
and change it to:
Code:
// char item_name[64];
in bot_globals.cpp around line 595 find:
Code:
menutext_t menuWaypointAddFlag =
{
0x3FF,
" Waypoint Flags\n"
"1. Add Block with Hostage\n"
"2. Add T ONLY Camp\n"
"3. Add CT ONLY Camp\n"
"4. Del Block with Hostage\n"
"5. Del T ONLY Camp\n"
"6. Del CT ONLY Camp\n"
"\n"
"0. Cancel"
};
and change it to:
Code:
menutext_t menuWaypointAddFlag =
{
0x3FF,
" Waypoint Flags\n"
"1. Add Block with Hostage\n"
"2. Add T ONLY Camp\n"
"3. Add CT ONLY Camp\n"
"4. Add Use Button\n"
"5. Del Block with Hostage\n"
"6. Del T ONLY Camp\n"
"7. Del CT ONLY Camp\n"
"8. Del Use Button\n"
"\n"
"0. Cancel"
};
in dll.cpp around line 2066 find:
Code:
case 4:
WaypointChangeFlags (W_FL_NOHOSTAGE, 0);
EMIT_SOUND_DYN2 (pEntity, CHAN_WEAPON, "weapons/he_bounce-1.wav", 1.0, ATTN_NORM, 0, 100);
break;
case 5:
WaypointChangeFlags (W_FL_TERRORIST, 0);
EMIT_SOUND_DYN2 (pEntity, CHAN_WEAPON, "weapons/he_bounce-1.wav", 1.0, ATTN_NORM, 0, 100);
break;
case 6:
WaypointChangeFlags (W_FL_COUNTER, 0);
EMIT_SOUND_DYN2 (pEntity, CHAN_WEAPON, "weapons/he_bounce-1.wav", 1.0, ATTN_NORM, 0, 100);
break;
and change it to:
Code:
case 4:
WaypointChangeFlags (W_FL_USE_BUTTON, 1);
EMIT_SOUND_DYN2 (pEntity, CHAN_WEAPON, "weapons/he_bounce-1.wav", 1.0, ATTN_NORM, 0, 100);
break;
case 5:
WaypointChangeFlags (W_FL_NOHOSTAGE, 0);
EMIT_SOUND_DYN2 (pEntity, CHAN_WEAPON, "weapons/he_bounce-1.wav", 1.0, ATTN_NORM, 0, 100);
break;
case 6:
WaypointChangeFlags (W_FL_TERRORIST, 0);
EMIT_SOUND_DYN2 (pEntity, CHAN_WEAPON, "weapons/he_bounce-1.wav", 1.0, ATTN_NORM, 0, 100);
break;
case 7:
WaypointChangeFlags (W_FL_COUNTER, 0);
EMIT_SOUND_DYN2 (pEntity, CHAN_WEAPON, "weapons/he_bounce-1.wav", 1.0, ATTN_NORM, 0, 100);
break;
case 8:
WaypointChangeFlags (W_FL_USE_BUTTON, 0);
EMIT_SOUND_DYN2 (pEntity, CHAN_WEAPON, "weapons/he_bounce-1.wav", 1.0, ATTN_NORM, 0, 100);
break;
there thats it.
[/edit]
[edit2]
i think i said this but i guess u didn't see or something. I said i stoped them from pushing buttons at random, but because the code does not implement the button flag even if you put a button flag there they will not push a button. So the dll I released, they do NOT push buttons at all.
PMB already put the Use Button flag in the upper left corner if the flag is on the waypoint. No there are no sprite changes or color changes the only way to know if the button flag is there is to move upto a waypoint and check if the button flag is listed in the upper left corner.
[/edit2]