000
16.04.2002, 15:23
XTreMe978
|
moin moin Also, ich wollte fragen ob mir vielleicht jemand sagen kann wie das geht das das normale HL-C4 nich einfach auf den Boden fällt, sondern an der Wand kleben bleibt, also so wie die Tripmines. Ihc hab mir zwar den Tripmine code angeschaut aber eigentlich nix bemerkenswertes das mir da weiterhelfen könnte, wäre also net wenn mir jemand sagen könnte wo es dazu vielleicht nen Tut oder so was gibt !!! (Bitte nicht mit "Lern C++" antworten, bin dabei !)
--
http://www.xtreme-home.de/
|
|
Profil || Suche
|
001
16.04.2002, 15:50
XTreMe978
|
hallo ?
--
http://www.xtreme-home.de/
|
|
Profil || Suche
|
002
16.04.2002, 15:59
[RMen]OneStone
|
Folgende Angaben beziehen sich auf die satchel.cpp:
Z. 72: pev->movetype = MOVETYPE_FLY;
CSatchel::PrimaryAttack:
void CSatchel::PrimaryAttack() { switch (m_chargeReady) { case 0: { //Deploy on Wall
UTIL_MakeVectors( m_pPlayer->pev->v_angle + m_pPlayer->pev->punchangle ); Vector vecSrc = m_pPlayer->GetGunPosition( ); Vector vecAiming = gpGlobals->v_forward;
TraceResult tr;
UTIL_TraceLine( vecSrc, vecSrc + vecAiming * 128, dont_ignore_monsters, ENT( m_pPlayer->pev ), &tr );
if (tr.flFraction < 1.0) { CBaseEntity *pEntity = CBaseEntity::Instance( tr.pHit ); if ( pEntity && !(pEntity->pev->flags & FL_CONVEYOR) ) { Vector angles = UTIL_VecToAngles( tr.vecPlaneNormal );
CBaseEntity *pEnt = CBaseEntity::Create("monster_tripmine", tr.vecEndPos + tr.vecPlaneNormal * 8, angles, m_pPlayer->edict() );
m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType]--;
// player "shoot" animation m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); if ( m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0 ) { // no more satchels! RetireWeapon(); return; } } else { // ALERT( at_console, "no deploy\n" ); } } else {
} m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.3; } break; case 1: { SendWeaponAnim( SATCHEL_RADIO_FIRE );
edict_t *pPlayer = m_pPlayer->edict( );
CBaseEntity *pSatchel = NULL;
while ((pSatchel = UTIL_FindEntityInSphere( pSatchel, m_pPlayer->pev->origin, 4096 )) != NULL) { if (FClassnameIs( pSatchel->pev, "monster_satchel")) { if (pSatchel->pev->owner == pPlayer) { pSatchel->Use( m_pPlayer, m_pPlayer, USE_ON, 0 ); m_chargeReady = 2; } } }
m_chargeReady = 2; m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.5; m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 0.5; break; }
case 2: // we're reloading, don't allow fire { } break; } } Sollte gehen, habs nicht ausprobiert!
--
georg-wicherski@pixel-house.net | http://www.pixel-house.net/ - Coding Resource| http://www.google.de/
|
|
Profil || Suche
|
003
16.04.2002, 16:21
XTreMe978
|
ok, thx, ich probiers schnell
--
http://www.xtreme-home.de/
|
|
Profil || Suche
|
004
16.04.2002, 16:42
XTreMe978
|
hmmmm, 8 errors, irgendwas mit Case funzt net :( ich hab die satchel.cpp mal auf meine HP geladen, kannst dir ja mal anschauen http://www.xtreme-home.de/satchel.cpp
---------------------------------- D:\SDK\Tactical-Seals\Source Code\dlls\satchel.cpp(370) : error C2360: initialization of 'pEntity' is skipped by 'case' label D:\SDK\Tactical-Seals\Source Code\dlls\satchel.cpp(346) : see declaration of 'pEntity' D:\SDK\Tactical-Seals\Source Code\dlls\satchel.cpp(370) : error C2360: initialization of 'tr' is skipped by 'case' label D:\SDK\Tactical-Seals\Source Code\dlls\satchel.cpp(342) : see declaration of 'tr' D:\SDK\Tactical-Seals\Source Code\dlls\satchel.cpp(370) : error C2360: initialization of 'vecAiming' is skipped by 'case' label D:\SDK\Tactical-Seals\Source Code\dlls\satchel.cpp(341) : see declaration of 'vecAiming' D:\SDK\Tactical-Seals\Source Code\dlls\satchel.cpp(370) : error C2360: initialization of 'vecSrc' is skipped by 'case' label D:\SDK\Tactical-Seals\Source Code\dlls\satchel.cpp(340) : see declaration of 'vecSrc' D:\SDK\Tactical-Seals\Source Code\dlls\satchel.cpp(392) : error C2360: initialization of 'pEntity' is skipped by 'case' label D:\SDK\Tactical-Seals\Source Code\dlls\satchel.cpp(346) : see declaration of 'pEntity' D:\SDK\Tactical-Seals\Source Code\dlls\satchel.cpp(392) : error C2360: initialization of 'tr' is skipped by 'case' label D:\SDK\Tactical-Seals\Source Code\dlls\satchel.cpp(342) : see declaration of 'tr' D:\SDK\Tactical-Seals\Source Code\dlls\satchel.cpp(392) : error C2360: initialization of 'vecAiming' is skipped by 'case' label D:\SDK\Tactical-Seals\Source Code\dlls\satchel.cpp(341) : see declaration of 'vecAiming' D:\SDK\Tactical-Seals\Source Code\dlls\satchel.cpp(392) : error C2360: initialization of 'vecSrc' is skipped by 'case' label D:\SDK\Tactical-Seals\Source Code\dlls\satchel.cpp(340) : see declaration of 'vecSrc' ------------------------------------------
--
http://www.xtreme-home.de/
|
|
Profil || Suche
|
005
16.04.2002, 17:13
Tron
|
lern c++
--
'KEINE PANIK' - aus der Triologie in fuenf Baenden von Douglas Adams
'FÜR DEINN FERD' - aus 'Gevatter Tod' von Terry Pratchett
|
|
Profil || Suche
|
006
16.04.2002, 17:23
Ferdi
|
":"
--
|
|
Profil || Suche
|
007
16.04.2002, 19:57
TheTinySteini
|
Tripmine source is in der ggrenade.cpp glaub ich... nur so nebenbei.
Ansonsten dies hier:
CGlue *pGlue = new CPatex( EXTRA_STRONG );
if( pWall = WallInFront() ) { ApplyGlue( pC4, PRETTY_MUCH ); if( HandsFullWithGlue() ) { m_pPlayer->EnableControl( false ); return false; } else { StickToWall( pC4, pWall ); } if( IsSticky( pC4 ) return true; else return false; }
--
TheTinySteini Coder Poke646 "Don't Panic" - Hitchhiker's Guide to the Galaxy
|
|
Profil || Suche
|