When any person within the limits of this State shall inflict an injury on any person who at the time the injury is inflicted is beyond the limits of this State or when any person beyond the limits of this State shall inflict an injury on any person at the time within the limits of this State and such injury shall cause the death of the person injured, in either case the person causing such death shall be subject to be indicted, tried and punished in the first case in the county of this State where the person inflicting the injury was at the time when the injury was inflicted and, in the second case, in the county in which it was received. The procedure and punishment shall be in all respects the same as if both parties were within such county at the time the injury was inflicted and the homicide had been in all respects completed in such county.