target_print GPFs if alerted from a script, or targeted by c


(SCDS_reyalP) #1

src/game/g_target.c: 126


void Use_Target_Print (gentity_t *ent, gentity_t *other, gentity_t *activator) {
	if ( activator->client && ( ent->spawnflags & 4 ) ) {
		trap_SendServerCommand( activator-g_entities, va("cp "%s"", ent->message ));
		return;
	}


activator may be NULL.
Obviously if bit 4 is set, triggering from a script is meaningless, but this crashes for team and global prints as well.


(digibob) #2

That’ll teach you to target it from a script then :wink:

But seriously, yeah, some error checking is required.